s = input()
key = 'keyence'
L =''
R = ''

n = len(s)

i = 0
j = 0
flg = False

while i < n and j < 7:
    if s[i] == key[j]:
        i += 1
        j += 1
    else:
        if flg:
            print('NO')
            exit()
        flg = True
        while s[i] != key[j]:
            i += 1
            if i==n:
                break
if (flg and i < n):
    print('NO')
elif j < 7:
    print('NO')
else:
    print('YES')