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