program main
implicit None
character(len = 100)::s
character(len = 7)::a
integer::i,p,f,b
	a ="keyence"
	f =0
	b =0
	
	read *,s
	
	do i = 1,7
		if(s(i:i) /= a(i:i))then
			f = i-1
			exit
		endif
		if(i == 7) f = 7
	enddo
	
	p = len_trim(s)
	do i = 1,7
		if(s((p-i+1):(p-i+1)) /= a((8-i):(8-i)))then
			b = i-1
			exit
		endif
		if(i ==7) b = 7
	enddo
	
	if((f+b) >= 7)then
		print "(a)","YES"
		else
			print"(a)","NO"
	endif
end program main