require 'set'
S = gets.chomp.chars
ODD = Set.new(%w[R U D])
EVEN = Set.new(%w[L U D])

result = 'Yes'
S.each_slice(2) do |odd, even|
  break(result = 'No') unless ODD.include?(odd) && (even.nil? || EVEN.include?(even))
end

puts result
