odd_fleq_step_pattern = ['R','U','D']
even_fleq_step_pattern = ['L','U','D']

steps = gets.chomp.split('')

ans = []
steps.each.with_index(1) do |step, i|
  if i.odd?
    ans << odd_fleq_step_pattern.include?(step)
  else
    ans << even_fleq_step_pattern.include?(step)
  end
end

puts ans.all? ? 'YES' : 'NO'

