s = input()

k = 'keyence'


for i in range(1, 8):
    a, b = i, 7-i
    l, r = k[:i], k[i:]
    
    if l in s and r in s:
        if s.find(l) < s.find(r):
            print("YES")
            exit()

print('NO')