#include <bits/stdc++.h>
int main() {
  std::string str;
  std::cin >> str;
  std::string keyence = "keyence";
  bool remove = false;
  int idx = 0;
  bool ans = true;
  for (int i = 0; i < str.size(); ++i) {
    char c = str[i];
    if (idx < 7 && c == keyence[idx]) {
      ++idx;
    } else {
      if (remove) {
        ans = false;
        break;
      }
      if (idx == 7) break;
      remove = true;
      std::string s1 = std::string(str.begin() + i, str.end());
      std::string s2 = std::string(keyence.begin() + idx, keyence.end());
      auto pos = s1.find(s2);
      if (pos == std::string::npos) {
        ans = false;
        break;
      }
      i += pos + s2.size() - 1;
      idx = 7;
    }
  }
  if (ans)
    std::cout << "YES" << std::endl;
  else
    std::cout << "NO" << std::endl;
}
