/*
 * Ankit Raj, NIT Agartala
 */
#include<bits/stdc++.h>
using namespace std;
#define lld long long int
#define MAX_RANGE 10000007
#define BOOST ios_base::sync_with_stdio(0) 
#define NITRO cin.tie(NULL)
#define pb push_back
#define mp make_pair
#define F first
#define S second
int main()
{
	BOOST;
	NITRO;
	//clock_t t1,t2;
	//t1 = clock();
	/*
	#ifndef ONLINE_JUDGE
	freopen("input.txt","r",stdin);
	freopen("output.txt","w",stdout);
	#endif
	*/ 
	//Main Code
	string s;
	cin>>s;
	string ch = "keyence";
	bool ans = false;
	int n = ch.length();
	string first = "";
	string last = ch;
	for(int i=-1;i<n;i++)
	{
		if(i==-1)
		{
			auto pos = s.find(last);
			if(pos!=string::npos)
			{
				if((s.length()-pos+1)==n)
				{
					ans = true;
					break;
				}
			}
		}
		else
		{
			first += ch[i];
			last.erase(0,1);
			//cout<<first<<" "<<last<<"\n";
			auto pos1 = s.find(first);
			auto pos2 = s.find(last);
			if(pos1!=string::npos && pos2!=string::npos)
			{
			//cout<<pos1<<" "<<pos2<<"\n";
			if(pos1==0 || pos2==0 && s.length()==(first.length()+last.length()+abs(pos2-pos1-1)) && (pos1+first.length())==s.length() || (pos2+last.length())==s.length())
			{
				ans = true;
				break;
			}
			}
		}
	}
	if(ans)
	{
		cout<<"YES"<<"\n";
	}
	else
	{
		cout<<"NO"<<"\n";
	}
	

	//t2 = clock();
	//float diff = (float)t2 - (float)t1;
	//float execution_time = diff/CLOCKS_PER_SEC;
	//cout<<"\n"<<execution_time;
	//system("pause");
}
