(ns Atcoder.ABC049-C)
(require '[clojure.string :as str])
(def S (apply str (vec (reverse (read-line)))))
(def div '("maerd" "remaerd" "esare" "resare"))
(def l (count S))

(def ans (loop [cnt 0 pos 0 flg 0]
           (if (and (< cnt 4) (< pos l))
             (if (>= l (+ (count (nth div cnt)) pos))
               (if (= (subs S pos (+ (count (nth div cnt)) pos)) (nth div cnt))
                 (recur 0 (+ pos (count (nth div cnt))) 1)  ; cnt = 0, pos = pos + div, flg = 1
                 (recur (inc cnt) pos 0))
               (if (= (subs S pos) (nth div cnt))
                 (recur 0 (+ pos (count (nth div cnt))) 1)
                 (recur (inc cnt) pos 0)))
             (if (= flg 1) "YES" "NO"))))

(println ans)