a = input()
k="keyence"
ti = 0
x =[0]*(len(a))
r = 0
for i in range(len(a)):
    if ti==7:
        r+=1
        break
    elif a[i] == k[ti]:
        ti +=1
        x[i]=1
        if i!=0 and  x[i-1]!=1:r+=1     
if ti == 7 and r < 2:
    print(r,"YES")
else:
    print(r,"NO")