//1974
#include<bits/stdc++.h>
using namespace std;
int main()
{int l,l1,l2,i,j;
	 string s,a;
	 cin>>s;
	 a="keyence";
	 i=0;
	 l=a.size();
	 while(a[i]==s[i])
	 {
	 	i++;
	 }l1=i;
	 i=l-1;
	 j=s.size()-1;
	 while(a[i]==s[j])
	 {
	 	i--;j--;
	 }
	 l2= s.size()-1-j;
	 if(l1+l2==l||l1+l2=2*l)
	 cout<<"YES";
	 else cout<<"NO";
	 
	  
	 
	 
}