#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int m = s.size();
  if (m < 7) {
    cout << "NO\n";
    return 0;
  }
  string r = s.substr(0, 3);
  string p = s.substr(m - 4, 4);
  if (r == "key" && p == "ence") {
    cout << "YES\n";
    return 0;
  }
  cout << "NO\n";
}
