#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  string key = "keyence";
  size_t k = 0;
  size_t i = 0;
  int skipCount = 0;
  while (k < key.size()) {
    int f = str.find(key[k], i);
    if (f == string::npos) {
      skipCount = 999;
      break;
    }
    if (i != f) {
      skipCount++;
      if (skipCount >= 2) {
        skipCount = 999;
        break;
      }
    }
    i = f + 1;
    ++k;
  }
  if (i != str.size()) {
    skipCount++;
  }
  if (skipCount == 0 || skipCount == 1) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
