#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int main() {
  string S;
  string key = "keyence";
  cin >> S;
  queue<char> q;
  for (int i = 0; i < S.size(); i++) {
    q.push(S[i]);
  }
  int cnt = 0, err = 0, errflag = 0;
  while (!q.empty()) {
    if (q.front() != key[cnt]) {
      errflag = 1;
    } else {
      if (errflag == 1) {
        errflag = 0;
        err++;
      }
      cnt++;
    }
    q.pop();
    if (cnt == 7) {
      if ((!q.empty() && err >= 1) || err >= 2) {
        cout << "NO";
        return 0;
      } else {
        cout << "YES";
        return 0;
      }
    }
  }
  cout << "NO";
}
