#include <vector>
#include <utility>
#include <map>
#include <algorithm>

using namespace std;

bool is_keyence(const string& s)
{
  string keyence = "keyence";
  if (keyence == s) return true;
  auto pos = s.find(keyence);
  if (pos == 0 or pos == s.size() - keyence.size()) return true;
  size_t begin = 0;
  for (; s[begin] == keyence[begin]; ++begin);
  size_t end = s.size() - 1;
  for (size_t i = keyence.size() - 1; s[end] == keyence[i]; --end, --i);
  return begin + (s.size() - 1 - end) >= keyence.size();
}

int main()
{
  string s;
  cin >> s;
  cout << (is_keyence(s) ? "YES" : "NO") << endl;
  return 0;
}