#include <bits/stdc++.h>
using namespace std;

using ll=long long;
const ll MOD=1000000007;

int main() {
  string s,k="keyence";
  cin >> s;
  int t=s.size();
  int bool=0;
  if(s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]==k)
    bool=1;
  else if(s[t-7]+s[t-6]+s[t-5]+s[t-4]+s[t-3]+s[t-2]+s[t-1]==k)
    bool=1;
  else{
    int i=0;
    while(i<7){
      if(s[i]==k[i]){
        i++;
      }
      else
      break;
    }
    whilr(i<7){
      if(s[t-1-i]==k[6-i]){
        i++;
      }
      else
        break;
    }
    if(i==7){
      bool=1;
    }
    if(bool==1){
      cout << "YES" << endl;
    }
    else
      cout << "NO" << endl;
}