s = input()

key = 'keyence'
yes = False

if key in s:
    idx = s.index('key')
    if idx == 0:
        yes = True
    elif len(s) - idx == 7:
        yes = True
else:
    for i in range(1,8):
        pre = key[:i]
        post = key[i:]
        #print(pre, post)
        if pre in s:
            idx = s.index(pre)
            #print('end', s[len(s)-(7-i):])
            if s[len(s)-(7-i):] == post:
                yes = True
                break
        
if yes == True:
    print('YES')
else:
    print('NO')