check :: String -> Int -> Bool
check [] _ = True
check (x:xs) n
  | n `mod` 2 == 0 = if x `elem` "LUD" then check xs (n+1) else False
  | otherwise      = if x `elem` "RUD" then check xs (n+1) else False

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