S = input()
K = 'keyence'

kn = 0
bf = False
las = False
for i in range(len(S)):
    if kn == 7:
        break
    if S[i] == K[kn]:
        kn += 1
        if bf == True:
            las = True
    else:
        if bf == False:
            bf = True
            continue
        elif bf == True and las == False:
            continue
        elif bf == True and las == True:
            print('NO')
            exit()

if kn == 7:
    print('YES')
else:
    print('NO')