S = eval(input())



ans = "NO"

for i in range(len(S)):

    for j in range(1, len(S)):

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

        if t == "keyence":

            ans = "YES"

            break

print(ans)
S = eval(input())



ans = "NO"

for i in range(len(S)):

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

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

        if t == "keyence":

            ans = "YES"

            break

print(ans)
S = eval(input())
ans = "NO"
for i in range(len(S)):
    for j in range(1, len(S)):
        t = S[:i] + S[j:]
        if t == "keyence":
            ans = "YES"
            break
print(ans)

S = eval(input())
ans = "NO"
for i in range(len(S)):
    for j in range(i, len(S)):
        t = S[:i] + S[j:]
        if t == "keyence":
            ans = "YES"
            break
print(ans)

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