import sys
S = input()
key = 'keyence'
count, start = 0, 0
pre = 'k'
now = 0

for i in S:
    if i == pre and start == 0:
        start = 1
        pre = key[start]
        count = 0
    elif i == pre:
        start += 1
        pre = key[start]
        if start == 6:
            print('YES')
            sys.exit()
        continue
    elif start != 0 and count > 1:
        print('NO')
        sys.exit()
    elif start != 0 and i != pre and now != 0:
        count += 1
        now = 1

print('NO')
