#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  string ss = "keyence";
  int count = 0;
  int i = 0;
  vector<int> v;
  for (int j = 0; j < ss.length(); j++) {
    for (; i < s.length(); i++) {
      if (ss[j] == s[i]) {
        v.push_back(i);
        i++;
        break;
      }
    }
  }
  if (v.size() != ss.length()) {
    printf("NO\n");
    return 0;
  }
  int ans = 0;
  for (int i = 0; i < v.size() - 1; i++) {
    if (v[i] == v[i + 1] - 1)
      continue;
    else
      ans++;
  }
  if ((ans == 1 && v[0] == 0 && v[v.size() - 1] == s.length() - 1) ||
      (ans == 0 && (v[0] == 0 || v[v.size() - 1] == s.length() - 1)))
    printf("YES\n");
  else
    printf("NO\n");
}
