input_lines2 = gets.chop.split("").map(&:to_s)
mozi = ""
finish = true
for row  in 0...input_lines2.size
    mozi = input_lines2[row]
    if mozi != "U" || mozi != "D" 
        if (mozi != "R" && row%2 == 0) || (mozi != "L" && row%2 == 1)
            finish = false
        end
    end
end

if finish
    puts "Yes"
else
    puts "No"
end