#include <bits/stdc++.h>
int main() {
  std::string a;
  std::string b = "keyence";
  std::cin >> a;
  if (a.substr(0, 7) == "keyence" || a.substr(a.size() - 6, 7) == "keyence")
    std::cout << "YES" << std::endl;
  else {
    bool found = false;
    uint64_t j = 0;
    uint64_t k = b.size() - 1;
    for (uint64_t i = 0;; i++) {
      if (a[i] == b[j] && !found) {
        found = true;
        j++;
      } else if (a[i] == b[j] && found)
        j++;
      else if (a[i] != b[j] && found)
        break;
    }
    for (uint64_t i = a.size() - 1;; i--) {
      if (a[i] != b[k] && k > j) {
        std::cout << "NO" << std::endl;
        break;
      } else if (a[i] == b[k] && k == j) {
        std::cout << "YES" << std::endl;
        break;
      } else if (a[i] == b[k] && k > j)
        k--;
    }
  }
}
