tap [] _=True
tap (x:xs) n
  |n`mod`2==1&&x`elem`"RUD"||
  n`mod`2==0&&x`elem`"LUD"=True&&tap xs (n+1)
  |otherwise=False

main=do
  n<-getLine
  let ans=tap n 1
  if ans
    then putStrLn "Yes"
    else putStrLn "No"
