check :: String -> Bool
check [] = True
check [s] = s `elem` "RUD"
check (s1:s2:ss)
  | s1 `elem` "RUD" && s2 `elem` "LUD" = check ss
  | otherwise = False

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