#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  long long int n = s.size();
  vector<long long int> v;
  string c = "keyence";
  long long int flag = 0;
  for (long long int i = 0; i < n - 6; ++i) {
    if (s[i] == 'k') {
      v.push_back(i);
    }
  }
  for (long long int i = 0; i < v.size(); ++i) {
    long long int ind = v[i];
    long long int m = ind, mm = 0, cn = 0, f = 0, d = 0;
    while ((cn < 7) && (m < n)) {
      if (s[m] == c[mm]) {
        cn++;
        m++;
        mm++;
        d = 0;
      } else {
        m++;
        if (d == 0) {
          f++;
        }
        d = 1;
      }
    }
    if ((cn == 7) && (f < 2)) {
      flag = 1;
    }
  }
  if (flag == 1) {
    cout << "YES\n";
  } else
    cout << "NO\n";
  return 0;
}
