s=eval(input())

if s[0:1]=='k' and s[len(s)-6:len(s)]=='eyence':

  print('YES')

elif s[0:2]=='ke' and s[len(s)-5:len(s)]=='yence':

  print('YES')

elif s[0:3]=='key' and s[len(s)-4:len(s)]=='ence':

  print('YES')

elif s[0:4]=='keye' and s[len(s)-3:len(s)]=='nce':

  print('YES')

elif s[0:5]=='keyen' and s[len(s)-2:len(s)]=='ce':

  print('YES')

elif s[0:6]=='keyenc' and s[len(s)-1:len(s)]=='e':

  print('YES')

else:

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

S='keyence'

c=0

for i in range(7):

  if s[0:i]==S[0:i] and s[len(s)-7+i:len(s)]==S[i:7]:

    c+=1

if c>0:print('YES')

else:print('NO')
s = eval(input())
if s[0:1] == "k" and s[len(s) - 6 : len(s)] == "eyence":
    print("YES")
elif s[0:2] == "ke" and s[len(s) - 5 : len(s)] == "yence":
    print("YES")
elif s[0:3] == "key" and s[len(s) - 4 : len(s)] == "ence":
    print("YES")
elif s[0:4] == "keye" and s[len(s) - 3 : len(s)] == "nce":
    print("YES")
elif s[0:5] == "keyen" and s[len(s) - 2 : len(s)] == "ce":
    print("YES")
elif s[0:6] == "keyenc" and s[len(s) - 1 : len(s)] == "e":
    print("YES")
else:
    print("NO")

s = eval(input())
S = "keyence"
c = 0
for i in range(7):
    if s[0:i] == S[0:i] and s[len(s) - 7 + i : len(s)] == S[i:7]:
        c += 1
if c > 0:
    print("YES")
else:
    print("NO")

-if s[0:1] == "k" and s[len(s) - 6 : len(s)] == "eyence": -    print("YES") -elif s[0:2] == "ke" and s[len(s) - 5 : len(s)] == "yence": -    print("YES") -elif s[0:3] == "key" and s[len(s) - 4 : len(s)] == "ence": -    print("YES") -elif s[0:4] == "keye" and s[len(s) - 3 : len(s)] == "nce": -    print("YES") -elif s[0:5] == "keyen" and s[len(s) - 2 : len(s)] == "ce": -    print("YES") -elif s[0:6] == "keyenc" and s[len(s) - 1 : len(s)] == "e": +S = "keyence" +c = 0 +for i in range(7): +    if s[0:i] == S[0:i] and s[len(s) - 7 + i : len(s)] == S[i:7]: +        c += 1 +if c > 0: