#include <bits/stdc++.h>
using namespace std;
const int inf = 1001001000;
const long long INF = 1LL << 60;
const int MOD = (int)1e9 + 7;
int main() {
  string s;
  cin >> s;
  bool f = false, b = false;
  for (int i = 0; i < s.size(); ++i) {
    if (!f) {
      string t = s.substr(i, 3);
      if (t == "key") f = true;
    }
    if (f) {
      string t = s.substr(i, 4);
      if (t == "ence") {
        b = true;
        break;
      }
    }
  }
  cout << ((f && b) ? "YES" : "NO") << endl;
  return 0;
}
