#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  int n = s.size();
  const string k = "keyence";
  int ptr = 0;
  vector<int> rem(n, 0);
  for (int i = 0; i < (n); ++i) {
    if (s[i] == k[ptr])
      ++ptr;
    else
      rem[i] = 1;
  }
  int cnt = 0;
  for (int i = 0; i < (n - 1); ++i) {
    if (rem[i] != rem[i + 1]) ++cnt;
  }
  if (ptr == 7 && cnt <= 2)
    puts("YES");
  else
    puts("NO");
  return 0;
}
