main = do
  s <- getLine
  putStrLn (if check s 1 then "Yes" else "No")

check :: String -> Int -> Bool
check s a
  | s == "" = True
  | mod a 2 == 0 && ok (head s) = check (tail s) (a + 1)
  | mod a 2 == 0 = False
  | ok2 (head s) = check (tail s) (a + 1)
  | otherwise = False

ok :: Char -> Bool
ok 'R' = False
ok c = True

ok2 :: Char -> Bool
ok2 'L' = False
ok2 c = True
