#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");
  string ans;
  if (key == -1 || ence == -1) {
    ans = "NO";
  } else if (key + 3 > ence) {
    ans = "NO";
  } else {
    ans = "YES";
  }
  cout << ans << endl;
}
