import re



s = eval(input())

t = 'keyence'



for i in range(len(t)):

    ptn = '^' + t[:i] + '.*' + t[i:] + '$'

    # print(ptn)

    m = re.match(ptn, s)

    if m: break



if m:

    print('YES')

else:

    print('NO')

s = eval(input())

N = len(s)



bl = False

for i in range(N):

    for j in range(i, N):

        t = s[:i] + s[j:]

        if t == 'keyence':

            bl = True

            break



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

import re

s = eval(input())
t = "keyence"
for i in range(len(t)):
    ptn = "^" + t[:i] + ".*" + t[i:] + "$"
    # print(ptn)
    m = re.match(ptn, s)
    if m:
        break
if m:
    print("YES")
else:
    print("NO")

s = eval(input())
N = len(s)
bl = False
for i in range(N):
    for j in range(i, N):
        t = s[:i] + s[j:]
        if t == "keyence":
            bl = True
            break
print(("YES" if bl else "NO"))

-import re - -t = "keyence" -for i in range(len(t)): -    ptn = "^" + t[:i] + ".*" + t[i:] + "$" -    # print(ptn) -    m = re.match(ptn, s) -    if m: -        break -if m: -    print("YES") -else: -    print("NO") +N = len(s) +bl = False +for i in range(N): +    for j in range(i, N): +        t = s[:i] + s[j:] +        if t == "keyence": +            bl = True +            break +print(("YES" if bl else "NO"))