#include <bits/stdc++.h>
using namespace std;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
const long long mod = 1000000007;
const long long inf = long long(1e9);
const long long half_inf = long long(1e5);
const long long ll_inf = long long(1e9) * long long(1e9);
int main() {
  string s;
  cin >> s;
  string k = "keyence";
  int idx = 0;
  int idxs = 0;
  int difc = 0;
  bool diff = false;
  string ans;
  while (idx < k.length() && idxs < s.length()) {
    if (s[idxs] == k[idx]) {
      ans += s[idxs];
      idx++;
      idxs++;
    } else {
      if (diff) {
        cout << "NO" << endl;
        return 0;
      } else {
        diff = true;
        while (idxs < s.length() && idx < k.length() && s[idxs] != k[idx]) {
          idxs++;
          difc++;
        }
      }
    }
  }
  if (diff && difc + ans.length() != s.length())
    cout << "NO" << endl;
  else if (ans == k)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
