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 main():
      S = input()
      if S[0] != 'k':
          return ('NO')
      elif S = 'keyence':
          return ('YES')
  
      ans = 'keyence'
      i = 0
      j = 0
      while True:
          i += 1
          j += 1
          if S[i] != ans[j]:
              break
  
      #残りの文字数
      num = 7-j
      cnt = 0
      while cnt < num:
          cnt += 1
          #print(ans[-cnt])
          if S[-cnt] != ans[-cnt]:
              return ('NO')
      return ('YES')
  print(main())
  
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"}]