In quadrilateral ABCD, CD=14, ∠BAD=105o, ∠ACD=35o, and ∠ACB=40o. Let the midpoint of CD be M. Points P and Q lie on AM and BM, respectively, such that ∠APB=40o and ∠AQB=40o . PB intersects CD at point R and QA intersects CD at point S. If CR=2, what is the length of SM?