import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val s = sc.nextLine().reverse
    val ans = if (f(s)) "YES" else "NO"
    println(ans)
  }

  def f(s: String): Boolean = {
    if (s == "") true else {
      s.take(7) match {
        case "maerd" => f(s.drop(5))
        case "remaerd" => f(s.drop(7))
        case "esare" => f(s.drop(5))
        case "resare" => f(s.drop(6))
        case _ => false
      }
    }
  }
}
