s=gets.chomp.split("")
if(s.size%2==1)
  str=s.pop
  if(s.join("")=~/^((R|U|D)(L|U|D))+?$/)
    if(str=~/(R|U|D)/)
      puts "Yes"
    else
      puts "No"
    end
  else
    puts "No"
  end
else
  if(s.join("")=~/^((R|U|D)(L|U|D))+?$/)
    puts "Yes"
  else
    puts "No"
  end
end