#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, a = "keyence";
  cin >> s;
  int cnt = 0, j = 0;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == a[j]) {
      j++;
      if (cnt == 1) cnt++;
      if (j == a.size() && i == s.size() - 1) break;
      if (j == a.size() && cnt == 0) break;
    } else if (cnt != 1) {
      cnt++;
      if (cnt == 3) break;
    }
  }
  if (j == a.size() && (cnt == 0 || cnt == 2))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
