#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    cin >> s;
    
    string k = "keyence";
    int ki = 0, f = 0;
    for (int i = 0; i < s.size(); i++) {
        if (f == 0) {
            if (s[i] == k[ki]) {
                if (ki == 6) f = 3, break;
                else ki++;
            }
            else f = 1;
        }
        else if (f == 1) {
            if (s[i] == k[ki]){
                if (ki == 6)
                    if (i == (s.size()-1)) f = 3, break;
                    else break;
                else f = 2, ki++;
            }
        }
        else if (f == 2) {
            if (s[i] == k[ki]){
                if (ki == 6)
                    if (i == (s.size()-1)) f = 3, break;
                    else break;
                else ki++;
            }
            else break;
        }
    }
    if (f == 3) cout << "YES" << endl;
    else cout << "NO" << endl;
}