require 'pp'

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

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
