#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(false);
  string key = "keyence";
  string s;
  cin >> s;
  int n = key.size();
  bool ok = false;
  for (int i = 0; i < (n - 1); i++) {
    string a = key.substr(0, i + 1);
    auto pos = s.find(a);
    if (pos == std::string::npos) continue;
    string b = key.substr(i + 1, n - 1);
    auto pos2 = s.find(b, pos);
    if (pos2 != std::string::npos) {
      ok = true;
      break;
    }
  }
  if (ok)
    cout << "YES" << '\n';
  else
    cout << "NO" << '\n';
  return 0;
}
