#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 = -1, nonkeyendp = -1;
  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;
    }
  }
  if (str[0] != 'k' || str[nagasa - 1] != 'e') return false;
  do {
    if (str[i] != keyences[i]) {
      nonkeystartp = i + 1;
      break;
    }
    i++;
  } while (i < nagasa);
  i = nagasa - 1;
  j = 6;
  do {
    if (str[i] != keyences[j]) {
      nonkeyendp = i + 1;
      break;
    }
    i--;
    j--;
  } while (i >= 0);
  if (nonkeyendp == -1 || nonkeystartp == -1 ||
      (nonkeystartp - 1 + nagasa - nonkeyendp < 7))
    return false;
  if (nonkeystartp <= nonkeyendp) return true;
  return false;
}
