s = list(input())
k_index = []
k = list('keyence')

for i in range(len(s)):
    if s[i] == k[0]:
        k_index.append(i)

ans = 'NO'
for i in k_index:
    j = 0
    flag = 0
    for a in s[i:]:
        if a == k[j]:
            j += 1
            if flag == 0:
                flag = 1 # reading 1st half
            elif flag == 2:
                flag = 3 # reading 2nd half
            if j == len(k):
                ans = 'YES'
                break
        elif flag == 1: # end of 1st half
            flag = 2 # reading middle
        elif flag == 3:
            break
        if ans == 'YES':
            break

print(ans)