S = gets.chomp

cond = true

S.each_char.with_index do |c, idx|
  if idx.even?
    cond &= %w(R U D).include?(c)
  else
    cond &= %w(L U D).include?(c)
  end
end

if cond
  puts 'Yes'
else
  puts 'No'
end
