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 resolve():
      """
      code here
      """
  
      S = input()
  
      is_flag = False
      key = "keyence"
  
      for i in range(8):
          if i == 0:
              if S[-7:] == key:
                  is_flag = True
  
          elif 1 <= i < 7:
              if S[:i] == key[:i] and S[-1 * (7 - i) :] == key[-1 * (7 - i) :]:
                  is_flag = True
          else:
              if S[:7] == key:
                  is_flag = True
  
      print("YES") if is_flag else print("NO")
  
  
  if __name__ == "__main__":
      resolve()
  
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"}]