#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i = 0, f = 0, j = 0, kn = 0;
  string s, k = "keyence";
  cin >> s;
START:
  if (j == 0 && s[i] != 'k') {
    f++;
    for (; i < s.size(); i++) {
      if (s[i] == 'k') break;
    }
  }
  for (; i < s.size(); i++) {
    if (s[i] == k[j]) {
      if (k[j] == 'k') kn = i;
      j++;
      if (j == 7) break;
    }
    if (s[i + 1] != k[j]) {
      f++;
      for (; i < s.size(); i++) {
        if (s[i + 1] == k[j]) break;
      }
    }
  }
  if (j != 7 && i < s.size() - 1) {
    j = 0;
    i = kn + 1;
    f = 1;
    if (i < s.size()) goto START;
  }
  if (j == 7 && i < s.size() - 1) {
    f++;
  }
  if (f > 1 || j != 7)
    cout << "NO" << endl;
  else
    cout << "YES" << endl;
  return 0;
}
