let rec f i xs =
    match xs with
        |[] -> "Yes"
        |'U'::x -> f (i+1) x
        |'D'::x -> f (i+1) x
        |'R'::x -> if i%2=1 then f (i+1) x else "No"
        |'L'::x -> if i%2=0 then f (i+1) x else "No"
        |_ -> "No"
stdin.ReadLine() |> Seq.toList |> f 1 |> stdout.WriteLine