words = gets.chomp.split('')
odd_words = words.each_slice(2).map(&:first)
even_words = words.each_slice(2).map(&:last)
odd = %w(R U D)
even = %w(L U D)
odd_result = 0
even_result = 0

words.count.times do |i|
  odd_result += odd_words.include?(odd[i]) ? 1 : 0
  even_result += even_words.include?(even[i]) ? 1 : 0
end

puts odd_result == even_result ? "Yes" : "No"