#include <bits/stdc++.h>
using namespace std;
string s, keyence("keyence");
int main() {
  cin >> s;
  for (int x = 0; x < s.size(); x++) {
    for (int y = x; y < s.size(); y++) {
      for (int z = y; z < s.size(); z++) {
        for (int w = z; w <= s.size(); w++) {
          cout << x << " " << y << " " << z << " " << w << " "
               << s.substr(x, y - x) + s.substr(z, w - z) << endl;
          if (s.substr(x, y - x) + s.substr(z, w - z) == keyence) {
            cout << "YES" << endl;
            return 0;
          }
        }
      }
    }
  }
  cout << "NO" << endl;
  return 0;
}
