#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string S;
  cin >> S;
  string ks = "keyence";
  int ki = 0;
  int d = 0;
  string tmp = "";
  bool b1 = false;
  bool b2 = false;
  char c = '0';
  for (auto& e : S) {
    if (e == ks[ki]) {
      tmp += e;
      ki++;
      if (b1) b2 = true;
    } else {
      if (!b1) b1 = true;
      if (b2) {
        c = '1';
      }
      e = c;
    }
  }
  if (ks == tmp && (string::npos == S.find("1")))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
