#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  const string key = "keyence";
  bool check[7];
  for (int i = 0; i < 7; ++i) {
    check[i] = false;
  }
  int check_itr = 0;
  int remove = 0;
  vector<int> key_num;
  for (int i = 0; i < (int)s.length(); ++i) {
    if (check_itr < 7 && key[check_itr] == s[i]) {
      key_num.push_back(i);
      check_itr++;
    } else if (check_itr == 7) {
      key_num.push_back(500);
    }
  }
  string ans = "YES";
  if (key_num.size() != 7) {
    ans = "NO";
  } else {
    for (int i = 0; i < 6; ++i) {
      if (abs(key_num[i] - key_num[i + 1]) > 1) {
        remove++;
      }
    }
    if (remove >= 2) {
      ans = "NO";
    }
  }
  cout << ans << endl;
  return 0;
}
