main = do
  li <- getLine
  let ans = compute li
  putStrLn (if ans then "Yes" else "No")

compute :: String -> Bool
compute s = and [ f c | (c,f) <- zip s (cycle [od,ev]) ]

-- od c = elem c "RUD"
-- ev c = elem c "LUD"
od c = c /= 'L'
ev c = c /= 'R'
