s = input()
cmp_s = 'keyence'

n = len(s)

i = 0
j = 0
cnt = 0
while i < n and j < 7:
    if s[i] == cmp_s[j]:
        while s[i] == cmp_s[j] and j < 7 and i < n:
            i += 1
            j += 1
            if 7<=j or n<=i:
                break
    else:
        cnt += 1
        if 2 <= cnt:
            print('NO')
            exit()
        while s[i] != cmp_s[j]:
            i += 1
            if 7<=j or n<=i:
                break
if j == 7:
    print('YES')
else:
    print('NO')