S = gets.chomp

ok = true
S.chars.each_with_index do |c, i|
  if c == 'U' || c == 'D'
    next
  end

  if c == 'R' && i.odd?
    ok = false
  end

  if c == 'L' && i.even?
    ok = false
  end
end

if ok
  puts 'Yes'
else
  puts 'No'
end
