#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  string begin = s.substr(0, 3);
  string end = s.substr(s.size() - 4, 4);
  cout << (begin == "key" && end == "ence" ? "YES" : "NO") << endl;
}
