S = eval(input())

ans = 'NO'



n = len(S)

if S == 'keyence':

  ans = 'YES'

for i in range(n):

  for j in range(i,n):

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

    if T == 'keyence':

      ans = 'YES'

print(ans)

  

  
S = eval(input())

n = len(S)

ans = 'NO'

for i in range(n):

  j = i+n-7

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

  if Q == 'keyence':

    ans = 'YES'

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

S = eval(input())
n = len(S)
ans = "NO"
for i in range(n):
    j = i + n - 7
    Q = S[:i] + S[j:]
    if Q == "keyence":
        ans = "YES"
print(ans)

+n = len(S) -n = len(S) -if S == "keyence": -    ans = "YES" -    for j in range(i, n): -        T = S[:i] + S[j:] -        if T == "keyence": -            ans = "YES" +    j = i + n - 7 +    Q = S[:i] + S[j:] +    if Q == "keyence": +        ans = "YES"