key = "keyence"
s = str(input())
e = 0
flag = []
ma = ""

for i in range(len(s)):
    if(s[i] == key[e]):
        ma += s[i]
        e = min(len(key)-1,e+1)
        flag.append(1)
    else:
        flag.append(0)
if(len(ma) == len(key)):
    k = [flag[0]]
    for i in range(len(flag)-1):
        if(flag[i] != flag[i+1]):
            k.append(flag[i+1])
    if(k.count(0) < 2):
        print("YES")
    else:
        print("NO")
else:
    print("NO")