str = gets.chomp

a = ['L', 'U', 'D']
b = ['R', 'U', 'D']
result = ''
str.each_char.with_index{|c, i|
	next if (i.odd? && a.include?(c)) || (i.even? && b.include?(c))
	result = 'NO'
}
result = 'YES' if result == ''
puts result