S = input().strip()

N = len(S)

x = "keyence"

n = len(x)

if N<n:

    flag = 0

else:

    flag = 0

    for i in range(7):

        for j in range(1,8):

            if S[:i]+S[-j:]==x:

                flag = 1

                break

        if flag==1:break

if flag==1:

    print("YES")

else:

    print("NO")
S = input().strip()

N = len(S)

flag = 0

if S=="keyence":

    flag = 1

else:

    for i in range(N):

        for j in range(i,N):

            x = S[:i]

            y = S[j+1:]

            if x+y=="keyence":

                flag = 1

                break

        if flag==1:break

if flag==1:

    print("YES")

else:

    print("NO")
S = input().strip()
N = len(S)
x = "keyence"
n = len(x)
if N < n:
    flag = 0
else:
    flag = 0
    for i in range(7):
        for j in range(1, 8):
            if S[:i] + S[-j:] == x:
                flag = 1
                break
        if flag == 1:
            break
if flag == 1:
    print("YES")
else:
    print("NO")

S = input().strip()
N = len(S)
flag = 0
if S == "keyence":
    flag = 1
else:
    for i in range(N):
        for j in range(i, N):
            x = S[:i]
            y = S[j + 1 :]
            if x + y == "keyence":
                flag = 1
                break
        if flag == 1:
            break
if flag == 1:
    print("YES")
else:
    print("NO")

-x = "keyence" -n = len(x) -if N < n: -    flag = 0 +flag = 0 +if S == "keyence": +    flag = 1 -    flag = 0 -    for i in range(7): -        for j in range(1, 8): -            if S[:i] + S[-j:] == x: +    for i in range(N): +        for j in range(i, N): +            x = S[:i] +            y = S[j + 1 :] +            if x + y == "keyence":