import scala.io.StdIn
object Main extends App {
  main()
  def main() {
    val in = StdIn.readLine()
    val even = "RUD"
    val odd = "LUD"
    for ((c, i) <- in.zipWithIndex) {
      if ((i % 2 == 0 && !even.contains(c)) || (i % 2 != 0 && !odd.contains(c))) {
        println("NO")
        return
      }
    }
    print("YES")
  }
}
