#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  int key = -1, ence = -1;
  for (int i = 0; i < n - 2; i++) {
    if (s.substr(i, 3) == "key") {
      key = i;
      break;
    }
  }
  for (int i = n - 3; i >= 0; i--) {
    if (s.substr(i, 4) == "ence") ence = i;
  }
  if (key == -1 || ence == -1)
    cout << "NO" << endl;
  else if (key < ence)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
