#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  char c[] = "keyence";
  bool iCflg = false;
  bool iFlg = false;
  int j = 0, k = 0, l = 0;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == c[j]) {
      j++;
      if (c[j] == '\0') {
        iFlg = true;
        break;
      }
      if (k > 0) {
        l++;
      }
    } else {
      if (k == 0) {
      } else {
        j -= l;
        l = 0;
      }
      k++;
    }
  }
  if (iFlg && (k + 7 == s.length() || k == 0)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
