#include #include using namespace std; char s[150]; int i, lg, k; int main() { cin.get(s, 150); lg = strlen(s); for(i = 0;i < lg;i++) { if('A' <= s[i] && s[i] <= 'Z') s[i] += 32; } for(i = 0;i + 4 < lg;i++) { if(s[i] == 'y' && s[i + 1] == 'a' && s[i + 2] == 'r' && s[i + 3] == 'd' && s[i + 4] == 'i') { k = 1; break; } } if(k == 1) cout << "YES\n"; else cout << "NO\n"; return 0; }