#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  bool fl, fm, fr;
  cin >> s;
  int key = (int)s.find("key");
  int ence = (int)s.find("ence");
  if (key == -1 || ence == -1) {
    cout << "NO" << endl;
    return (0);
  }
  if (key != 0) {
    fl = true;
  }
  if (ence - key != 3) {
    fm = true;
  }
  if ((ence + 3) != s.size() - 1) {
    fr = true;
  }
  if (fl == true && fm == false && fr == false ||
      fl == false && fm == true && fr == false ||
      fl == false && fm == false && fr == true) {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
