import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    char[] cs;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    }

    void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

    boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    }

    boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    char[] cs;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    }

    void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

    boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    }

    boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
} Main char[] cs; cs public static void main(String args[]) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String args[] args void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    } run {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    } FastReader sc = new FastReader(); sc new FastReader() cs = sc.next().toCharArray() cs sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc solve() solve void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } solve {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    } int i = 0; i 0 boolean flag = true; flag true while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        } i < cs.length i cs.length cs cs.length {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        } if (checkDream(i)) {
                i += 5;
                continue;
            } checkDream(i) checkDream i {
                i += 5;
                continue;
            } i += 5 i 5 continue; if (checkDreamer(i)) {
                i += 7;
                continue;
            } checkDreamer(i) checkDreamer i {
                i += 7;
                continue;
            } i += 7 i 7 continue; if (checkErase(i)) {
                i += 5;
                continue;
            } checkErase(i) checkErase i {
                i += 5;
                continue;
            } i += 5 i 5 continue; if (checkEraser(i)) {
                i += 6;
                continue;
            } checkEraser(i) checkEraser i {
                i += 6;
                continue;
            } i += 6 i 6 continue; flag = false flag false break; if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        } flag {
            System.out.println("YES");
        } System.out.println("YES") System.out.println System.out System System.out "YES" {
            System.out.println("NO");
        } System.out.println("NO") System.out.println System.out System System.out "NO" boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    } checkDream {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    } if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        } cs[i] == 'd' cs[i] cs i 'd' {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        } if (i + 4 >= cs.length) {
                return false;
            } i + 4 >= cs.length i + 4 i 4 cs.length cs cs.length {
                return false;
            } return false; false if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            } cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' cs[i + 3] != 'a' cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' cs[i + 1] != 'r' cs[i + 1] cs i + 1 i 1 'r' cs[i + 2] != 'e' cs[i + 2] cs i + 2 i 2 'e' cs[i + 3] != 'a' cs[i + 3] cs i + 3 i 3 'a' cs[i + 4] != 'm' cs[i + 4] cs i + 4 i 4 'm' {
                return false;
            } return false; false if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            } i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5) checkErase(i + 5) i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5) i + 5 == cs.length i + 5 i 5 cs.length cs cs.length cs[i + 5] == 'd' cs[i + 5] cs i + 5 i 5 'd' checkErase(i + 5) checkErase i + 5 i 5 checkEraser(i + 5) checkEraser i + 5 i 5 {
                return true;
            } return true; true return false; false int i i boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    } checkDreamer {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    } if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        } cs[i] == 'd' cs[i] cs i 'd' {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        } if (i + 6 >= cs.length) {
                return false;
            } i + 6 >= cs.length i + 6 i 6 cs.length cs cs.length {
                return false;
            } return false; false if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            } cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r' cs[i + 5] != 'e' cs[i + 4] != 'm' cs[i + 3] != 'a' cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r' cs[i + 1] != 'r' cs[i + 1] cs i + 1 i 1 'r' cs[i + 2] != 'e' cs[i + 2] cs i + 2 i 2 'e' cs[i + 3] != 'a' cs[i + 3] cs i + 3 i 3 'a' cs[i + 4] != 'm' cs[i + 4] cs i + 4 i 4 'm' cs[i + 5] != 'e' cs[i + 5] cs i + 5 i 5 'e' cs[i + 6] != 'r' cs[i + 6] cs i + 6 i 6 'r' {
                return false;
            } return false; false if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            } i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e' i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e' i + 7 == cs.length i + 7 i 7 cs.length cs cs.length cs[i + 7] == 'd' cs[i + 7] cs i + 7 i 7 'd' cs[i + 7] == 'e' cs[i + 7] cs i + 7 i 7 'e' {
                return true;
            } return true; true return false; false int i i boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    } checkErase {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    } if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        } cs[i] == 'e' cs[i] cs i 'e' {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        } if (i + 4 >= cs.length) {
                return false;
            } i + 4 >= cs.length i + 4 i 4 cs.length cs cs.length {
                return false;
            } return false; false if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            } cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' cs[i + 3] != 's' cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' cs[i + 1] != 'r' cs[i + 1] cs i + 1 i 1 'r' cs[i + 2] != 'a' cs[i + 2] cs i + 2 i 2 'a' cs[i + 3] != 's' cs[i + 3] cs i + 3 i 3 's' cs[i + 4] != 'e' cs[i + 4] cs i + 4 i 4 'e' {
                return false;
            } return false; false if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            } i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e' i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e' i + 5 == cs.length i + 5 i 5 cs.length cs cs.length cs[i + 5] == 'd' cs[i + 5] cs i + 5 i 5 'd' cs[i + 5] == 'e' cs[i + 5] cs i + 5 i 5 'e' {
                return true;
            } return true; true return false; false int i i boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    } checkEraser {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    } if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        } cs[i] == 'e' cs[i] cs i 'e' {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        } if (i + 5 >= cs.length) {
                return false;
            } i + 5 >= cs.length i + 5 i 5 cs.length cs cs.length {
                return false;
            } return false; false if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            } cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r' cs[i + 4] != 'e' cs[i + 3] != 's' cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r' cs[i + 1] != 'r' cs[i + 1] cs i + 1 i 1 'r' cs[i + 2] != 'a' cs[i + 2] cs i + 2 i 2 'a' cs[i + 3] != 's' cs[i + 3] cs i + 3 i 3 's' cs[i + 4] != 'e' cs[i + 4] cs i + 4 i 4 'e' cs[i + 5] != 'r' cs[i + 5] cs i + 5 i 5 'r' {
                return false;
            } return false; false return true; true return false; false int i i static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } FastReader {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        } br = new BufferedReader(new
                    InputStreamReader(System.in)) br new BufferedReader(new
                    InputStreamReader(System.in)) String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } next {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        } while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            } try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                } catch (IOException e)
                {
                    e.printStackTrace();
                } IOException e {
                    e.printStackTrace();
                } e.printStackTrace() e.printStackTrace e {
                    st = new StringTokenizer(br.readLine());
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt()
        {
            return Integer.parseInt(next());
        } nextInt {
            return Integer.parseInt(next());
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong()
        {
            return Long.parseLong(next());
        } nextLong {
            return Long.parseLong(next());
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble()
        {
            return Double.parseDouble(next());
        } nextDouble {
            return Double.parseDouble(next());
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        } nextLine {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        } String str = ""; str "" try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            } catch (IOException e)
            {
                e.printStackTrace();
            } IOException e {
                e.printStackTrace();
            } e.printStackTrace() e.printStackTrace e {
                str = br.readLine();
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main {
    char[] cs;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    }

    void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

    boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    }

    boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
} public class Main {
    char[] cs;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    }

    void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

    boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    }

    boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {
    char[] cs;

    public static void main(String args[]) {
        new Main().run();
    }

    void run() {
        FastReader sc = new FastReader();
        cs = sc.next().toCharArray();
        solve();
    }

    void solve() {
        int i = 0;
        boolean flag = true;
        while (i < cs.length) {
            if (checkDream(i)) {
                i += 5;
                continue;
            }
            if (checkDreamer(i)) {
                i += 7;
                continue;
            }
            if (checkErase(i)) {
                i += 5;
                continue;
            }
            if (checkEraser(i)) {
                i += 6;
                continue;
            }
            flag = false;
            break;
        }
        if (flag) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
    }

    boolean checkDream(int i) {
        if (cs[i] == 'd') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' ||
                    checkErase(i + 5) || checkEraser(i + 5)) {
                return true;
            }
        }
        return false;
    }

    boolean checkDreamer(int i) {
        if (cs[i] == 'd') {
            if (i + 6 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'e' ||
                    cs[i + 3] != 'a' || cs[i + 4] != 'm' ||
                    cs[i + 5] != 'e' || cs[i + 6] != 'r') {
                return false;
            }
            if (i + 7 == cs.length || cs[i + 7] == 'd' || cs[i + 7] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkErase(int i) {
        if (cs[i] == 'e') {
            if (i + 4 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e') {
                return false;
            }
            if (i + 5 == cs.length || cs[i + 5] == 'd' || cs[i + 5] == 'e') {
                return true;
            }
        }
        return false;
    }

    boolean checkEraser(int i) {
        if (cs[i] == 'e') {
            if (i + 5 >= cs.length) {
                return false;
            }
            if (cs[i + 1] != 'r' || cs[i + 2] != 'a' ||
                    cs[i + 3] != 's' || cs[i + 4] != 'e' ||
                    cs[i + 5] != 'r') {
                return false;
            }
            return true;
        }
        return false;
    }

    static class FastReader {
        BufferedReader br;
        StringTokenizer st;

        public FastReader() {
            br = new BufferedReader(new
                    InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements())
            {
                try
                {
                    st = new StringTokenizer(br.readLine());
                }
                catch (IOException e)
                {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt()
        {
            return Integer.parseInt(next());
        }

        long nextLong()
        {
            return Long.parseLong(next());
        }

        double nextDouble()
        {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try
            {
                str = br.readLine();
            }
            catch (IOException e)
            {
                e.printStackTrace();
            }
            return str;
        }
    }
}
