require 'pp'

s = gets.chomp!.chars.group_by.with_index(1) {|x, i| i % 2 }

if s[0] == nil
    if s[1] == ['R'] || s[1] == ['U'] || s[1] == ['D']
        puts "Yes"
    else
        puts "No"
    end
else
    if [
        s[1].all?{|x| x == 'R' || x == 'U' || x == "D" },
        s[0].all?{|x| x == 'L' || x == 'U' || x == "D" },
    ].all?
        puts "Yes"
    else
        puts "No"
    end

end
