#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for(int i = 0; i < n; ++i)
using namespace std;

int main() {
  int a = 0;
  bool b = 0, c = 0;
  string s, t = "keyence";
  cin >> s >> endl;
  if(s == t) b = 1;
  else{
    rep(i, s.size()){
      if(!c && s[i] == t[a]){
        ++a;
      }
      else if(!c) c = 1;
      else if(c && i > s.size()-8+a){
        if(s[i] == t[a]) ++a;
        else break;
      }
      if(i == s.size()-1) b = 1;
    }
  }
  if(b) cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}