s = eval(input())

n = len(s)

k = 'keyence'

a = 0

b = 6



for i in range(n):

    if k[a] == s[i]:

        a += 1

    else:

        break

    if a == 7:

        break



for i in range(n)[::-1]:

    if k[b] == s[i]:

        b -= 1

    else:

        break

    if b == -1:

        break

    

b = 7 - b - 1

if a + b >= 7:

    print('YES')

else:

    print('NO')
s = list(eval(input()))

n = len(s)

for i in range(n):

    for j in range(i,n):

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

        if ''.join(t) == 'keyence':

            print('YES')

            exit(0)

print('NO')
s = eval(input())
n = len(s)
k = "keyence"
a = 0
b = 6
for i in range(n):
    if k[a] == s[i]:
        a += 1
    else:
        break
    if a == 7:
        break
for i in range(n)[::-1]:
    if k[b] == s[i]:
        b -= 1
    else:
        break
    if b == -1:
        break
b = 7 - b - 1
if a + b >= 7:
    print("YES")
else:
    print("NO")

s = list(eval(input()))
n = len(s)
for i in range(n):
    for j in range(i, n):
        t = s[:i] + s[j:]
        if "".join(t) == "keyence":
            print("YES")
            exit(0)
print("NO")

-s = eval(input()) +s = list(eval(input())) -k = "keyence" -a = 0 -b = 6 -    if k[a] == s[i]: -        a += 1 -    else: -        break -    if a == 7: -        break -for i in range(n)[::-1]: -    if k[b] == s[i]: -        b -= 1 -    else: -        break -    if b == -1: -        break -b = 7 - b - 1 -if a + b >= 7: -    print("YES") -else: -    print("NO") +    for j in range(i, n): +        t = s[:i] + s[j:] +        if "".join(t) == "keyence": +            print("YES") +            exit(0) +print("NO")