S=input()
t='keyence'

for i in range(len(t)-1):
    t1=t[:i+1]
    t2=t[i+1:]
    if S.count(t1)==1 and S.count(t2)==1:
        ind1=S.index(t1)
        ind2=S.index(t2)
        if ind1<=ind2:
            tmp=S.replace(t1,',').replace(t2,',').split(',')
            if len(tmp)<=3 and '' in tmp:
                print('YES')
                break
else:
    print('NO')