s = list(input())
x = list("keyence")
k = 0
t0 = 0
t1 = 0
t2 = 0
for i in range(len(s)):
    if s[i]!=x[k]:
        if k>0 and t0==1:
            break
        if k>0 and t1==1:
            t2 = 1
        if k>0 and t1==2:
            break
    if s[i]==x[k]:
        if k==0 and i>0:
            t0 = 1
        if t0==0:
            t1 = 1
        if t2==1:
            t1=2
        k+=1
    if k==len(x):
        break

if i==len(s)-1 and k==len(x):
    print("YES")
else:
    print("NO")