Language: Java

import java.util.*;
 
public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		/*String s = sc.next().substring(0,100000);*/
		while(true){
			if(s.equals("")){
				System.out.println("YES");
				return;
			}else if( (s.length()>=11)&&(s.substring(0,11).equals("dreameraser"))){
				s = s.substring(11);
			}else if( (s.length()>=10)&&(s.substring(0,10).equals("dreamerase"))){
				s = s.substring(10);
			}else if( (s.length()>=7)&&(s.substring(0,7).equals("dreamer"))){
				s = s.substring(7);
			}else if( (s.length()>=6)&&(s.substring(0,6).equals("eraser"))){
				s = s.substring(6);
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("dream"))){
				s = s.substring(5);
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("erase"))){
				s = s.substring(5);
			}else{
				System.out.println("NO");
				return;
			}
		}
	}
}

Compiler output:
Main.java:8: error: cannot find symbol
			if(s.equals("")){
			   ^
  symbol:   variable s
  location: class Main
Main.java:11: error: cannot find symbol
			}else if( (s.length()>=11)&&(s.substring(0,11).equals("dreameraser"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:11: error: cannot find symbol
			}else if( (s.length()>=11)&&(s.substring(0,11).equals("dreameraser"))){
			                             ^
  symbol:   variable s
  location: class Main
Main.java:12: error: cannot find symbol
				s = s.substring(11);
				^
  symbol:   variable s
  location: class Main
Main.java:12: error: cannot find symbol
				s = s.substring(11);
				    ^
  symbol:   variable s
  location: class Main
Main.java:13: error: cannot find symbol
			}else if( (s.length()>=10)&&(s.substring(0,10).equals("dreamerase"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:13: error: cannot find symbol
			}else if( (s.length()>=10)&&(s.substring(0,10).equals("dreamerase"))){
			                             ^
  symbol:   variable s
  location: class Main
Main.java:14: error: cannot find symbol
				s = s.substring(10);
				^
  symbol:   variable s
  location: class Main
Main.java:14: error: cannot find symbol
				s = s.substring(10);
				    ^
  symbol:   variable s
  location: class Main
Main.java:15: error: cannot find symbol
			}else if( (s.length()>=7)&&(s.substring(0,7).equals("dreamer"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:15: error: cannot find symbol
			}else if( (s.length()>=7)&&(s.substring(0,7).equals("dreamer"))){
			                            ^
  symbol:   variable s
  location: class Main
Main.java:16: error: cannot find symbol
				s = s.substring(7);
				^
  symbol:   variable s
  location: class Main
Main.java:16: error: cannot find symbol
				s = s.substring(7);
				    ^
  symbol:   variable s
  location: class Main
Main.java:17: error: cannot find symbol
			}else if( (s.length()>=6)&&(s.substring(0,6).equals("eraser"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:17: error: cannot find symbol
			}else if( (s.length()>=6)&&(s.substring(0,6).equals("eraser"))){
			                            ^
  symbol:   variable s
  location: class Main
Main.java:18: error: cannot find symbol
				s = s.substring(6);
				^
  symbol:   variable s
  location: class Main
Main.java:18: error: cannot find symbol
				s = s.substring(6);
				    ^
  symbol:   variable s
  location: class Main
Main.java:19: error: cannot find symbol
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("dream"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:19: error: cannot find symbol
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("dream"))){
			                            ^
  symbol:   variable s
  location: class Main
Main.java:20: error: cannot find symbol
				s = s.substring(5);
				^
  symbol:   variable s
  location: class Main
Main.java:20: error: cannot find symbol
				s = s.substring(5);
				    ^
  symbol:   variable s
  location: class Main
Main.java:21: error: cannot find symbol
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("erase"))){
			           ^
  symbol:   variable s
  location: class Main
Main.java:21: error: cannot find symbol
			}else if( (s.length()>=5)&&(s.substring(0,5).equals("erase"))){
			                            ^
  symbol:   variable s
  location: class Main
Main.java:22: error: cannot find symbol
				s = s.substring(5);
				^
  symbol:   variable s
  location: class Main
Main.java:22: error: cannot find symbol
				s = s.substring(5);
				    ^
  symbol:   variable s
  location: class Main
25 errors