#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string k = "keyence";
  int cnt = 0;
  int flag = 0;
  vector<int> v;
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == k[cnt]) {
      cnt++;
    } else {
      v.emplace_back(i);
    }
  }
  for (long long i = 0; i < v.size(); i++) {
    if (i > 0) {
      cout << v[i] - v[i - 1] << endl;
      if (v[i] - v[i - 1] != 1) {
        flag = 1;
      }
    }
  }
  if (flag == 0 && cnt >= 7) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
