import re

S = eval(input())

k = 'keyence'

for i in range(0, len(k)+1):

    rs = '^' + k[:i] + '.*' + k[i:] + '$'

    if re.match(rs, S) is not None:

        print('YES')

        break

else:

    print('NO')



S = eval(input())

ans = False

for i in range(0, len(S)):

    for j in range(len(S)-i+1):

        ns = S[:j] + S[j+i:]

        if ns == 'keyence':

            ans = True

            break

    if ans:

        break

print(('YES' if ans else 'NO'))

import re

S = eval(input())
k = "keyence"
for i in range(0, len(k) + 1):
    rs = "^" + k[:i] + ".*" + k[i:] + "$"
    if re.match(rs, S) is not None:
        print("YES")
        break
else:
    print("NO")

S = eval(input())
ans = False
for i in range(0, len(S)):
    for j in range(len(S) - i + 1):
        ns = S[:j] + S[j + i :]
        if ns == "keyence":
            ans = True
            break
    if ans:
        break
print(("YES" if ans else "NO"))

-import re - -k = "keyence" -for i in range(0, len(k) + 1): -    rs = "^" + k[:i] + ".*" + k[i:] + "$" -    if re.match(rs, S) is not None: -        print("YES") +ans = False +for i in range(0, len(S)): +    for j in range(len(S) - i + 1): +        ns = S[:j] + S[j + i :] +        if ns == "keyence": +            ans = True +            break +    if ans: -else: -    print("NO") +print(("YES" if ans else "NO"))