output_description: If S is a KEYENCE string, print `YES`; otherwise, print `NO`.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: def my_index(l, x, default=False):
      if x in l:
          return l.index(x)
      else:
          return -1
  
  
  a = input().split("!!!")
  a = list(a[0])
  judge = 0
  count = 0
  tmp1 = 0
  tmp2 = 0
  A = []
  B = []
  
  A.append(my_index(a, "k"))
  tmp1 = my_index(a, "k")
  if my_index(a, "k") != -1:
      a[my_index(a, "k")] = "AAA"
      judge += 1
  
  A.append(my_index(a, "e"))
  tmp2 = my_index(a, "e")
  if my_index(a, "e") != -1:
      a[my_index(a, "e")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  A.append(my_index(a, "y"))
  tmp2 = my_index(a, "y")
  if my_index(a, "y") != -1:
      a[my_index(a, "y")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  A.append(my_index(a, "e"))
  tmp2 = my_index(a, "e")
  if my_index(a, "e") != -1:
      a[my_index(a, "e")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  A.append(my_index(a, "n"))
  tmp2 = my_index(a, "n")
  if my_index(a, "n") != -1:
      a[my_index(a, "n")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  A.append(my_index(a, "c"))
  tmp2 = my_index(a, "c")
  if my_index(a, "c") != -1:
      a[my_index(a, "c")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  A.append(my_index(a, "e"))
  tmp2 = my_index(a, "e")
  if my_index(a, "e") != -1:
      a[my_index(a, "e")] = "AAA"
      judge += 1
  if tmp2 - tmp1 >= 2:
      count += 1
  tmp1 = tmp2
  
  B = A
  A.sort()
  if (A == B) and (judge == 7) and (count <= 2):
      print("YES")
  else:
      print("NO")
  
problem_description: Statement
  
  A string is called a KEYENCE string when it can be changed to `keyence` by
  removing its contiguous substring (possibly empty) only once.
  
  Given a string S consisting of lowercase English letters, determine if S is a
  KEYENCE string.
samples: [{"input": "keyofscience", "output": "YES\n    \n\n`keyence` is an abbreviation of `key of science`.\n\n* * *"}, {"input": "mpyszsbznf", "output": "NO\n    \n\n* * *"}, {"input": "ashlfyha", "output": "NO\n    \n\n* * *"}, {"input": "keyence", "output": "YES"}]