#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  string K = "keyence";
  int cnt = 0;
  bool flag = true;
  int cnt_k = 0;
  int cnt_t1 = 1;
  int cnt_t2 = 1;
  int cnt_t3 = 1;
  vector<char> T(1);
  for (int i = 0; i < S.size(); ++i) {
    if (cnt > 1) break;
    if (S[i] == K[cnt_k]) {
      cnt_k++;
      flag = true;
    } else if (flag == true && T[1] == '\0') {
      cnt++;
      flag = false;
      T.push_back(S[i]);
      cnt_t2++;
    } else if (flag == true && T[1] != '\0') {
      flag = false;
      if (S[i] != T[cnt_t1] && S[i] != T[cnt_t3])
        cnt++;
      else if (cnt_t1 != 1)
        cnt_t3++;
      else
        cnt_t1++;
    } else if (flag == true && T[1] != '\0' && cnt_t1 == T.size()) {
      flag = false;
      if (S[i] != T[cnt_t3])
        cnt++;
      else
        cnt_t3++;
    } else if (flag == false && cnt_t1 == 1) {
      T.push_back(S[i]);
    } else if (flag == false && T[cnt_t1] != '\0') {
      if (S[i] != T[cnt_t1])
        cnt++;
      else
        cnt_t1++;
    } else if (flag == false && T[cnt_t3] != '\0' && cnt_t1 == T.size()) {
      if (S[i] != T[cnt_t3])
        cnt++;
      else
        cnt_t3++;
    } else {
      cnt++;
    }
  }
  if (cnt <= 1 && cnt_k == K.size())
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
