
solveEven [] i = False
solveEven s i | i < 0 = True
              | odd i = solveEven s (i-1)
              | [s !! i] == "R" = solveEven s (i-1)
              | [s !! i] == "U"= solveEven s (i-1)
              | [s !! i] == "D" = solveEven s (i-1)
              | otherwise = False

solveOdd [] i = False
solveOdd s i | i < 0 = True
             | even i = solveOdd s (i-1)
             | [s !! i] == "L" = solveOdd s (i-1)
             | [s !! i] == "U" = solveOdd s (i-1)
             | [s !! i] == "D" = solveOdd s (i-1)
             | otherwise = False
 
main = do
    s <- getLine
    putStrLn $ if (solveEven s (length(s)-1)) && (solveOdd s (length(s)-1)) then "Yes" else "No"
