#include<cstdio>
using namespace std;
int main(){
    char c;
    int ok=0;
    while(scanf("%c",&c)>0 && c!='\n'){
        switch(c){
        case 'Y':
            if(ok==0){
                ok=1;
            }
            break;
        case 'a':
            if(ok==1){
                ok=2;
            }
            else{
                ok=0;
            }
            break;
        case 'r':
            if(ok==2){
                ok=3;
            }
            else{
                ok=0;
            }
            break;
        case 'd':
            if(ok==3){
                ok=4;
            }
            else{
                ok=0;
            }
            break;
        case 'i':
            if(ok==4){
                printf("YES");
                return 0;
            }
            else{
                ok=0;
            }
            break;
        default:
            ok=0;
        }
    }
    printf("NO");
    return 0;
}