#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  string keyence = "keyence";
  int l, find[7], used[100] = {};
  for (int i = 0; i < 7; i++) find[i] = -1;
  l = S.length();
  int j = 0;
  for (int i = 0; i < 7; i++) {
    for (; j < l; j++) {
      if (S[j] == keyence[i] && used[j] == 0) {
        find[i] = j;
        used[j] = 1;
        break;
      }
    }
  }
  for (int i = 0; i < 7; i++) {
    if (find[i] == -1) {
      cout << "NO" << endl;
      return 0;
    }
  }
  int count = 0;
  for (int i = 1; i < 7; i++) {
    if (find[i] - find[i - 1] != 1) count++;
    if (count == 3) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  return 0;
}
