#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j = 0, flag = 0, flag1 = 0, n, k;
  string str, kstr = "keyence";
  cin >> str;
  if (str == "keyence") {
    cout << "YES";
    return 0;
  }
  n = str.length();
  cout << n;
  for (i = 0; i < n; i++) {
    if (str.substr(i, 1) == kstr.substr(i, 1)) {
      j++;
    } else {
      flag++;
    }
    if (flag) break;
  }
  for (k = n - 1; k > 0; k--) {
    cout << k;
    if (str.substr(k, 1) == kstr.substr(7 - (n - k), 1)) {
      j++;
    } else {
      flag1++;
    }
    if (flag1) break;
  }
  cout << j;
  if (j >= 7) {
    cout << "YES";
    return 0;
  } else {
    cout << "NO";
    return 0;
  }
}
