#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1000000007LL;
ll ADD(ll x, ll y) { return (x + y) % MOD; }
ll SUB(ll x, ll y) { return (x - y + MOD) % MOD; }
ll MUL(ll x, ll y) { return x * y % MOD; }
ll POW(ll x, ll e) {
  ll v = 1;
  for (; e; x = MUL(x, x), e >>= 1)
    if (e & 1) v = MUL(v, x);
  return v;
}
ll DIV(ll x, ll y) { return MUL(x, POW(y, MOD - 2)); }
priority_queue<int> q_descending;
priority_queue<int, vector<int>, greater<int> > q_ascending;
int main(void) {
  ios_base::sync_with_stdio(false);
  string s, l = "", r = "keyence";
  int itr = 0;
  cin >> s;
  while (true) {
    l += r[0];
    for (int j = 0; j < (int)(r.size() - 1); j++) r[j] = r[j + 1];
    r.pop_back();
    if (s.find(l) == string::npos || s.find(r) == string::npos) {
      itr++;
      if (itr >= s.size() - 5 || itr >= 7) {
        cout << "NO" << endl;
        return 0;
      }
    } else {
      if ((s.find(l) == 0 && s.find(r) + r.size() == s.size()) ||
          (s.find(r) == s.find(l) + l.size() &&
           (s.find(l) == 0 || s.find(r) + r.size() == s.size()))) {
        cout << "YES" << endl;
        return 0;
      } else {
        itr++;
        if (itr >= s.size() - 5 || itr >= 7) {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  return 0;
}
