Problem:


Score : 300 points

Problem Statement

You are given a string S consisting of lowercase English letters.
Another string T is initially empty.
Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:

Append one of the following at the end of T: dream, dreamer, erase and eraser.

Constraints

1≦|S|≦10^5

S consists of lowercase English letters.

Input

The input is given from Standard Input in the following format:

S

Output

If it is possible to obtain S = T, print YES. Otherwise, print NO.

Sample Input 1

erasedream

Sample Output 1

YES

Append erase and dream at the end of T in this order, to obtain S = T.

Sample Input 2

dreameraser

Sample Output 2

YES

Append dream and eraser at the end of T in this order, to obtain S = T.

Sample Input 3

dreamerer

Sample Output 3

NO



Sample input:
erasedream


Sample output:
YES

Submission status: Wrong Answer

Solution code:
import subprocess
import gzip, base64, os
import stat

gz = b'H4sIAGKwaV0C/+19e3wTVdrwJOkl3JoiiAVRAgYsIr1wbfGWUgITCKXSUkHFIU1SGk2TbDLBgqi4bV1CRHld1sW9svu9u+vr7m91XV8/cF0uohTdVVFWxGURZBUnVKTeoHgh33nOOZOcmcxEWPX7y0Bz8jzzXM/lOZeZOeduh2u20WDg5I+Ru5YDyH2RHcN2iq/ypEkQrorrh75HcSO5AgTnM3R2zq5I+6hoOTVTOhP6ywO5RirfaFekIymdnBqYNJ9jP3ZF+ocmTpFynDXNB7YeWEqwB5YuU6Q7TAS/oUDJZ6R8fZSvj9LLKWfkFKnsXx79a6T4RuqXnM6idLMYevjUvyt64bf5eirversiXU3pVqv4rkd8Bdy5f4ppupDq08uXUmq/nMrlUB7wN0+bUh7wTgz4g7H2ie1V0yZOm1IWDZVNwjYVU9o5dYsU+VhCbR5K6wBcD41fvO0H3vmRBTcOv2OBtGTnRZuLx8G1CqbcBrfUL3OPnmUA3CT0Nw399b9ng/Bzz1+fv78ttWdtl2fYfUvsH078ULilyLqiotTxumvopoG1vxgZ3rLSedtTevlwDBl2gQbeZNDGF6drhvIzSgf/BKct55E8bXyTDv6YDn6LjvwWHfojOviKfG38TB36Ah36Mzr0k3Xy5wOdfE7pyFmgI+eHOv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I5bnOoNbRe7DD9Nona+dXcDfwLnSamNRyFahFCc5o2v0eGX18ebZHaZ8dnZ2ftDDsTUySn1SuFZeyueBa1xjj6hW1VI4GpqEm/8HbqSDM9OHAAA='
bin = gzip.decompress(base64.b64decode(gz))
p = os.path.dirname(__file__)
pymain = os.path.join(p, "a.out")
with open(pymain, "wb") as f:
    f.write(bin)
os.chmod(pymain, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
if p == "":
    pymain = "./" + pymain
subprocess.call(pymain)


# compiled by pythran
'''
#pythran export main2()
def main2():
    s = open('/dev/stdin').readline().replace('dreamer', '').replace('eraser', '').replace('dream', '').replace('erase', '')
    if s == '\n':
        print('YES')
    else:
        print('NO')
'''