#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int st = 0;
  int fin = 0;
  int index = 0;
  int ans = 1;
  int pc = 1;
  int pc2 = 1;
  int j, k;
  int l = 1;
  string key = "keyence!";
  cin >> s;
  if (s.size() < 7)
    cout << "NO" << endl;
  else {
    for (int i = 0; i < s.size(); i++) {
      if (s.at(i) == key.at(index)) {
        index++;
        if (st) fin = 1;
      } else {
        if (st && fin) {
          ans = 0;
          break;
        }
        st = 1;
      }
    }
    for (j = 0; j < 7; j++) {
      if (s.at(j) != key.at(j)) {
        pc = 0;
        break;
      }
    }
    for (k = 6; k > j; k--) {
      if (s.at(s.size() - l) != key.at(k)) {
        pc2 = 0;
        break;
      }
      l++;
    }
    if (ans && index == 7)
      cout << "YES" << endl;
    else if (pc)
      cout << "YES" << endl;
    else if (pc2)
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
