s = input()
key = 'keyence'
n = len(s)
i = 0
j = 0
L = 0
R = 0
while i < n and j < 7:
    if s[i] == key[j]:
        i += 1
        j += 1
    else:
        L = i
        while s[i] != key[j]:
            i += 1
            if i == n:
                break
        R = i
        break
if L == 0 and s[R:] == key:
    print('YES')
elif j == 7 and s[0:i] == key:
    print('YES')
else:
    if s[0:L]+s[R:] == key:
        print('YES')
    else:
        print('NO')