#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000000 + 7;
int main() {
  cout << setprecision(10);
  string S;
  cin >> S;
  int key = S.find("key");
  int ence = S.find("ence");
  int keyence = S.find("keyence");
  string ans;
  if (keyence != -1) {
    if (keyence == 0) {
      ans = "YES";
    } else if (keyence == S.size() - 7) {
      ans = "YES";
    } else {
      ans = "NO";
    }
  } else if (key == -1 || ence == -1) {
    ans = "NO";
  } else if (key == 0 && ence + 3 == S.size() - 1) {
    ans = "YES";
  } else {
    ans = "NO";
  }
  cout << ans << endl;
}
