# frozen_string_literal: true

s = gets.chomp

so = (0..(s.size-1)).step(2).map { |i| s[i] }
se = (1..(s.size-1)).step(2).map { |i| s[i] }

if so.all? { |e| %w[D R U].include?(e) } && se.all? { |e| %w[D L U].include?(e) }
  puts 'Yes'
else
  puts 'No'
end
