f :: String -> Bool
f [] = True
f [x] =  if x `elem` ['R','U','D'] then True else False
f [x,y] = if x `elem` ['R','U','D'] && y `elem` ['L','U','D'] then True else False
f (x:y:xs) = if x `elem` ['R','U','D'] && y `elem` ['L','U','D'] then True && f xs else False && f xs
main = do
 s <- getLine
 if (f s) == True then putStrLn "Yes" else putStrLn "No"