#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string S;
  cin >> S;
  string T = "keyence", S1 = " ", S2 = " ", T1;
  int k = 0;
  bool flag = true;
  for (int i = 0; i < S.size(); i++) {
    if (S[i] != T[k] && flag == true) {
      flag = false;
      S1 = S.substr(0, i);
      reverse(T.begin(), T.end());
      T1 = T.substr(0, 7 - k);
    }
    k++;
  }
  if (flag == false) {
    reverse(S.begin(), S.end());
    for (int i = 0; i < S.size() - T.size(); i++) {
      if (S.substr(i, T1.size()) == T1) {
        S2 = T1;
        reverse(S1.begin(), S2.begin());
        cout << "YES" << endl;
        return 0;
      }
    }
  }
  if (S1 == T || S2 == T || S1 + S2 == T || S == T)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
