s = input()
k = 'keyence'
i = c = 0
inds = []
ans = 'NO'
for a,x in enumerate(s):
    if i<7:
        if x==k[i]:
            i+=1
            inds.append(a)
        if i==7:
            for z in range(i-1):
                if inds[z+1]-inds[z]>1:
                    c+=1
            if c<=1:ans='YES'
    else:
        if c:ans='NO'
print(ans)