s = gets.chomp.chars
i = 0
s.each do |t|
  if i == 0 and t == "L"
    print("No")
    i = 2
    break
  elsif i == 1 and t == "R"
    print("No")
    i = 2
    break
  end
  i = 1-i
end
unless i == 2
  print("Yes")
end