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: #include <iostream>
  #include <vector>
  #include <algorithm>
  #include <utility>
  #include <string>
  #include <queue>
  #include <stack>
  
  using namespace std;
  
  typedef long long int ll;
  typedef pair<int, int> Pii;
  
  const ll mod = 1000000007;
  
  int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
  
    string s;
    cin >> s;
  
    int n = s.length();
  
    string keyence = "keyence";
    int p = 0;
    for (int i = 0; i < 7; i++) {
      if (s[i] == keyence[p]) p++;
      else break;
    }
    for (int i = n-7+p; i < n; i++) {
      if (s[i] == keyence[p]) p++;
      else break;
    }
  
    if (p == 7) cout << "YES" << endl;
    else cout << "NO" << endl;
  
    return 0;
  }
  
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"}]