def bb
    s = gets.chomp

    for i in 0..(s.length-1)
        c = s[i]
        next if c == 'U'
        next if c == 'D'
    if i%2 == 0
            next if c == 'R'
            puts 'No'
            exit
        else
            next if c == 'L'
            puts 'No'
            exit
        end
    end

    puts 'Yes'
end

bb
