import Data.List
import Control.Monad

data YesNo = Yes | No deriving(Show)


solver :: String  -> YesNo
solver s
    | null s = Yes
    | isPrefixOf "remaerd" s = solver $ drop 7 s
    | isPrefixOf "maerd"   s = solver $ drop 5 s
    | isPrefixOf "resare"  s = solver $ drop 6 s
    | isPrefixOf "esare"   s = solver $ drop 5 s
    | otherwise      = No

main :: IO ()
main = getLine >>= (print . solver . reverse)
