s = input()
l = []
i = 0

for w in 'keyence':
    if w in s:
        i += s[i:].find(w)
        l.append(i)
        i += 1

if len(l) == len('keyence') and l== sorted(l):
    cnt = 0
    for i in range(len(l)-1):
        if l[i+1] - l[i] > 1:
            cnt += 1
    if cnt <= 1:
        print('YES')
        exit()

print('NO')