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():
      import sys
  
      input = sys.stdin.readline
      sys.setrecursionlimit(10**7)
      from collections import Counter, deque
      from collections import defaultdict
      from itertools import combinations, permutations, accumulate, groupby, product
      from bisect import bisect_left, bisect_right
      from heapq import heapify, heappop, heappush
      from math import floor, ceil, pi, factorial
      from operator import itemgetter
  
      def I():
          return int(input())
  
      def MI():
          return map(int, input().split())
  
      def LI():
          return list(map(int, input().split()))
  
      def LI2():
          return [int(input()) for i in range(n)]
  
      def MXI():
          return [[LI()] for i in range(n)]
  
      def SI():
          return input().rstrip()
  
      def printns(x):
          print("\n".join(x))
  
      def printni(x):
          print("\n".join(list(map(str, x))))
  
      inf = 10**17
      mod = 10**9 + 7
      # main code here!
      s = SI()
      n = len(s)
      for i in range(8):
          s1 = s[:i]
          s2 = s[n + i - 7 :]
  
          if s1 + s2 == "keyence":
              print("YES")
              exit()
      print("NO")
  
  
  if __name__ == "__main__":
      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"}]