#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  auto key = s.find("key");
  auto ence = s.find("ence");
  if (key < 1000 && ence < 1000) {
    if (key < ence)
      cout << "YES";
    else
      cout << "NO";
  } else
    cout << "NO";
}
