#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool flg = false;
  for (int i = 0; i < 3; ++i) {
    auto key = s.find("");
    ;
    auto ence = s.find("");
    switch (i) {
      case 0:
        key = s.find("key");
        ence = s.find("ence");
        break;
      case 1:
        key = s.find("key");
        ence = s.rfind("ence");
        break;
      case 2:
        key = s.rfind("key");
        ence = s.rfind("ence");
        break;
    }
    if (key < 1000 && ence < 1000) {
      if (key < ence && ((key == 0 && key + 3 == ence) ||
                         (s.size() - 4 == ence && ence - 3 == key) ||
                         (key == 0 && s.size() - 4 == ence)))
        flg |= true;
      else
        flg |= false;
    } else
      flg |= false;
  }
  if (flg)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
