main = interact $ maybe "Yes" (const "No") . lookup False . flip zip [0..] . zipWith ($) [all (/= 'R'), all (/= 'L')] . map (map snd ) . zipWith ($) [filter (odd . fst), filter (even . fst)] . repeat . zip [0..] . head . words