#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string key = "keyence";
  bool f = 0;
  bool f2 = 0;
  bool f3 = 0;
  string k;
  int p = 0;
  for (int i = 0; i < s.size(); ++i) {
    k += s.at(i);
    if (k.at(p) != key.at(p)) {
      if (p == 0) {
        k = "";
        f2 = 1;
      } else {
        if (f) {
          cout << "NO" << endl;
          return 0;
        } else {
          f = 1;
          f2 = 1;
          k.pop_back();
        }
      }
    } else {
      ++p;
    }
    if (k == key) {
      if (f2 && i != s.size() - 1) {
        cout << "NO" << endl;
        return 0;
      } else {
        f3 = 1;
      }
    } else if (i == s.size() - 1 && !f3) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
}
