def tap_dance(s)
  odd = %w[R U D]
  even = %w[L U D]

  s.each_char.with_index do |c, i|
    table = (i % 2).zero? ? odd : even
    return 'No' unless table.include?(c)
  end
  'Yes'
end

puts tap_dance(gets.chomp)