[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let ss = (read string).ToCharArray() |> Array.toList
    let rec f xs ys = function
        | [] -> (xs, ys)
        | a :: b :: rs -> f (a :: xs) (b :: ys) rs
        | a :: rs -> (a :: xs, ys)
    let (bs, cs) = f [] [] ss
    let b1 = List.forall (fun x -> x = 'R' || x = 'U' || x = 'D') bs
    let b2 = List.forall (fun x -> x = 'L' || x = 'U' || x = 'D') cs
    if b1 && b2 then
        printfn "Yes"
    else
        printfn "No"
    0