#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int size = int(s.size());
  string keyence = "keyence";
  int pos = 0;
  bool used1 = false, used2 = false;
  for (int i = 0; i < size; i++) {
    if (s[i] == keyence[pos]) {
      if (used1) used2 = true;
      pos++;
    } else if (s[i] != keyence[pos]) {
      if (!used1) used1 = true;
      if (used1 && used2) {
        cout << "NO" << endl;
        return 0;
      }
    }
    if (pos == 7 && i == size - 1) {
      cout << "YES" << endl;
      return 0;
    }
  }
  cout << "NO" << endl;
}
