#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  string a = "keyence";
  int t = 0, x[7];
  for (int i = 0; i < n; i++) {
    if (s[i] == a[t]) {
      x[t++] = i;
    }
    if (t == 7) break;
  }
  if (x[6] - x[0] == 6) {
    if (x[0] == 0 || x[6] == n - 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  } else {
    int k = 0;
    for (int i = 1; i < 7; i++)
      if (x[i] - x[i - 1] > 1) k++;
    if (k == 1 && x[0] == 0 && x[6] == n - 1)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
