main=do
 s<-reverse<$>getLine
 putStrLn(if(f s)then"YES"else"NO")
  where f "" = True
        f s |(take 5 s)=="maerd"   = f (drop 5 s)
            |(take 7 s)=="remaerd" = f (drop 7 s)
            |(take 5 s)=="esare"   = f (drop 5 s)
            |(take 6 s)=="resare"  = f (drop 6 s)
            |otherwise             = False