#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.size();
  string tmp = "keyenceA";
  int l = -1;
  int r = -1;
  int k = 0;
  int no = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == tmp[k]) {
      k++;
      if (l != -1) r = 1;
    } else {
      if (r == 1) {
        no = 1;
        break;
      } else {
        l = 1;
      }
    }
  }
  if (k == tmp.size() - 1 && no == 0) {
    cout << "YES" << endl;
    return 0;
  }
  k = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == tmp[k]) {
      k++;
    } else {
      break;
    }
  }
  int ku = tmp.size() - 2;
  for (int i = n - 1; i >= 0; i--) {
    if (s[i] == tmp[ku]) {
      ku--;
    } else {
      break;
    }
  }
  if (k + 1 >= ku) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
