S=input()
key="keyence"

exclude=0
now=False
count=0
for i in range(len(S)):
    s=S[i]
    if s==key[count]:
        if now:
            now=False
        count+=1
    else:
        if (not now) and exclude>0:
            print("NO")
            exit()
        if not now:
            exclude+=1
            now=True
if count!=len(S)-1:
    print("NO")
else:
    print("YES")
