#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  string A = "keyence";
  int j = 0, jj = 0, jjj = 0;
  int b = 0;
  int f = 1;
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == A[j]) {
      if (f == 1) {
        f = 2;
        b = j;
        jjj = j;
      }
      j++;
    } else if (b != 0 && str[i] == A[jjj]) {
      jjj++;
    } else if (jjj == 7 && str[i] == A[b]) {
      jjj = b;
      jjj++;
    } else {
      jj++;
      if (f == 2) {
        f = false;
        break;
      }
      f = 1;
    }
  }
  int a = 0;
  for (int aa = str.length() - 7; aa < str.length(); aa++) {
    if (str[aa] == A[a]) {
      a++;
    }
  }
  if (a == 7)
    cout << "YES" << endl;
  else if ((j == 7 || jjj == 7) && f)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
