#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  string K = "keyence";
  cin >> S;
  int i = 0, j = 0;
  while (j < K.size()) {
    if (S[i++] != K[j++]) {
      j--;
      break;
    }
  }
  int x = 1, y = 1;
  while (j + y <= K.size()) {
    if (S[S.size() - x] != K[K.size() - y]) {
      x++;
      y++;
      break;
    }
    x++;
    y++;
  }
  y--;
  cout << j << y << K.size();
  if (j + y >= K.size()) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
