#include using namespace std; void nullify(char ch[]){ for(int i = 0; i < 100; ++i){ ch[i] = 0; } } int main(){ char ll[100]; nullify(ll); cin >> ll; int match = 0; bool f = false; for(int i = 0; i < 100; ++i){ switch(ll[i]){ case 89: match = 1; break; case 97: if(match == 1){ ++match; }else{ match = 0; } break; case 114: if(match == 2){ ++match; }else{ match = 0; } break; case 100: if(match == 3){ ++match; }else{ match = 0; } break; case 105: if(match == 4){ ++match; }else{ match = 0; } break; default: match = 0; break; } if(match == 5){ f = true; break; } } if(f == true){ cout << "YES"; }else{ cout << "NO"; } return 0; }