import           Control.Monad
import           Data.List

solve [] = "Yes"
solve s
  | "dream" `isSuffixOf` s = (solve . take (length s - 5)) s
  | "dreamer" `isSuffixOf` s = (solve . take (length s - 7)) s
  | "erase" `isSuffixOf` s = (solve . take (length s - 5)) s
  | "eraser" `isSuffixOf` s = (solve . take (length s - 6)) s
  | otherwise = "No"

main :: IO ()
main = do
  s <- getLine
  putStrLn $ solve s
