S = input()
keyence_len = len("keyence")
keyence="keyence"

now=0
remove=False
removeout=False
for i in range(len(S)):
    if remove and now >= keyence_len:
        print("NO")
        exit()
    if S[i]==keyence[now]:
        if remove:
            removeout = True
        now+=1
    else:
        if removeout:
            print("NO")
            exit()
        remove=True
if now==keyence_len:
    print("YES")
else:
    print("NO")