#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  string jud = "keyence";
  cin >> s;
  int n = jud.size();
  bool flag = false;
  for (int i = 0; i < (int)(7); i++) {
    string s1 = jud.substr(0, i);
    string s2 = jud.substr(i, n - i);
    auto pos1 = s.find(s1);
    auto pos2 = s.find(s2);
    if (pos1 < pos2) {
      cout << pos1 << " " << pos2 << endl;
      if (pos1 == 0 && pos2 == s.size() - s2.size()) flag = true;
    }
  }
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
