#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  string key = "keyence";
  int f = 0;
  int count = 0;
  int p[7] = {-1, -1, -1, -1, -1, -1, -1};
  cin >> s;
  int l = s.find("keyence");
  if (l == 0) {
    cout << "YES";
    return 0;
  }
  int r = s.rfind("keyence");
  if (r == s.length() - key.length()) {
    cout << "YES";
    return 0;
  }
  for (int i = 1; i < key.length(); i++) {
    int l = s.find(key.substr(0, i));
    int r = s.rfind(key.substr(i, key.length() - i + 1));
    if (l != -1 && r != -1 && l < r) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
