#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  string keyence = "keyence";
  int index = 0;
  bool is_removing = false;
  int cnt = 0;
  for (int i = 0; i < (int)(S.size()); i++) {
    if (S.at(i) == keyence.at(index)) {
      index++;
      is_removing = false;
    } else if (!is_removing) {
      is_removing = true;
      cnt++;
    }
  }
  cout << (cnt < 2 && index == keyence.size() ? "YES" : "NO") << endl;
  return 0;
}
