s = gets.chomp.split("")

odd = s.each_slice(2).map { |n| n.first }
even = s.each_slice(2).map { |n| n.last }

if odd == "R" || "U" || "D" && even == "L" || "U" || "D"
  puts "Yes"
else
  puts "No"
end
