import re

from sys import stdin

N=(stdin.readline().rstrip())

for i in range(7):

    mae="keyence"[0:i+1]

    ato="keyence"[i+1:8]

    if re.search(".*keyencekeyence",N):

        if (re.sub('.*keyencekeyence', '', N)=="")==True:

            print("YES")

            break

    if re.search("keyencekeyence.*",N):

        if (re.sub('keyencekeyence.*', '', N)=="")==True:

            print("YES")

            break

    if (re.sub('.*keyence', '', N)=="")==True:

        print("YES")

        break

    if (re.sub('keyence.*', '', N)=="")==True:

        print("YES")

        break

    if re.match("%s.*%s"%(mae, ato),N):

        if (re.sub('%s.*%s'%(mae,ato) ,"", N)=="")==True:

            print("YES")

            break

if i==6:

    print("NO")
from sys import stdin

S = (stdin.readline().rstrip())

flag = False

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

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

        if j >= i:

            if S[:i]+S[j:] == "keyence":

                flag = True

if flag:

    print("YES")

else:

    print("NO")
import re
from sys import stdin

N = stdin.readline().rstrip()
for i in range(7):
    mae = "keyence"[0 : i + 1]
    ato = "keyence"[i + 1 : 8]
    if re.search(".*keyencekeyence", N):
        if (re.sub(".*keyencekeyence", "", N) == "") == True:
            print("YES")
            break
    if re.search("keyencekeyence.*", N):
        if (re.sub("keyencekeyence.*", "", N) == "") == True:
            print("YES")
            break
    if (re.sub(".*keyence", "", N) == "") == True:
        print("YES")
        break
    if (re.sub("keyence.*", "", N) == "") == True:
        print("YES")
        break
    if re.match("%s.*%s" % (mae, ato), N):
        if (re.sub("%s.*%s" % (mae, ato), "", N) == "") == True:
            print("YES")
            break
if i == 6:
    print("NO")

from sys import stdin

S = stdin.readline().rstrip()
flag = False
for i in range(0, len(S) + 1):
    for j in range(0, len(S) + 1):
        if j >= i:
            if S[:i] + S[j:] == "keyence":
                flag = True
if flag:
    print("YES")
else:
    print("NO")

-import re -N = stdin.readline().rstrip() -for i in range(7): -    mae = "keyence"[0 : i + 1] -    ato = "keyence"[i + 1 : 8] -    if re.search(".*keyencekeyence", N): -        if (re.sub(".*keyencekeyence", "", N) == "") == True: -            print("YES") -            break -    if re.search("keyencekeyence.*", N): -        if (re.sub("keyencekeyence.*", "", N) == "") == True: -            print("YES") -            break -    if (re.sub(".*keyence", "", N) == "") == True: -        print("YES") -        break -    if (re.sub("keyence.*", "", N) == "") == True: -        print("YES") -        break -    if re.match("%s.*%s" % (mae, ato), N): -        if (re.sub("%s.*%s" % (mae, ato), "", N) == "") == True: -            print("YES") -            break -if i == 6: +S = stdin.readline().rstrip() +flag = False +for i in range(0, len(S) + 1): +    for j in range(0, len(S) + 1): +        if j >= i: +            if S[:i] + S[j:] == "keyence": +                flag = True +if flag: +    print("YES") +else: