#include<iostream>
#include<algorithm>
#include<functional>
#include<string>
using namespace std;
int main(){
  string a;
  cin>>a;
  string b=a.at(0)+a.at(1)+a.at(2);
  int d=a.size()-4,e=a.size()-3,f=a.size()-2,g=a.size()-1;
  string c=a[d]+a[e]+a[f]+a[g];
  if(b=="key" and c=="ence")
    cout<<"YES"<<endl;
  else
    cout<<"NO"<<endl;
}
