s = gets.chomp.chars

odd = s.each_slice(2).map(&:first)
even = s.each_slice(2).map(&:last)

o = []
odd.each do |i|
  if i == "R" || "U" ||  "D"
    o.push("t")
  else
    o.push("f")
  end
end

e = []
e.each do |x|
  if x == "L" || "U" ||  "D"
    e.push("t")
  else
    e.push("f")
  end
end

o = o.size
e = e.size

if o >= 1 || e >= 1
  puts "Yes"
else
  puts "No"
end