#include <bits/stdc++.h>
using namespace std;
static const int KEYNAGASA = 7;
bool check(int c, string str);
int main() {
  bool flg = false;
  long keypos;
  long encepos;
  long keyencepos;
  string str;
  cin >> str;
  keyencepos = str.find("keyence");
  if (check(keyencepos, str)) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
bool check(int c, string str) {
  int i = 0, j, nonkeystartp = 0, nonkeyendp = 0;
  int nagasa = str.length();
  string keyences = "keyence";
  int pos[7] = {};
  if (c != string::npos) {
    if ((c == 0 || nagasa - c == KEYNAGASA)) {
      return true;
    } else {
      return false;
    }
  }
  do {
    if (str[i] == 'e') {
      if (pos[1] == 0)
        pos[1] = i + 1;
      else if (pos[3] == 0)
        pos[3] = i + 1;
      else if (pos[6] == 0)
        pos[6] = i + 1;
    } else {
      for (j = 0; j < 7; j++) {
        if (str[i] == keyences[j]) {
          if (str[i] != 'e') {
            pos[j] = i + 1;
          }
        }
      }
    }
    i++;
  } while (i <= nagasa + 1);
  for (i = 0; i < 7; i++) {
    if (pos[i] == 0) return false;
  }
  for (j = 0; j < 6; j++) {
    if (pos[j] + 1 != pos[j + 1]) {
      if (nonkeystartp == 0) {
        nonkeystartp = pos[j] + 1;
        nonkeyendp = pos[j + 1] - 1;
      } else {
        return false;
      }
    }
  }
  if (pos[0] != 1 || pos[6] != nagasa) return false;
  return true;
}
