#include <bits/stdc++.h>
using namespace std;
int main() {
  string ans = "keyence", s;
  cin >> s;
  int size = (int)(s.length());
  cout << size << endl;
  int tr = 0;
  int trg = 0;
  for (int i = 0; i != size; i++) {
    if (ans.substr(i, 1) != s.substr(i, 1)) {
      if (trg == 1) {
        cout << "NO" << endl;
        return -1;
      }
      tr = 1;
    }
    if (ans.substr(i, 1) == s.substr(i, 1)) {
      if (tr = 1) {
        trg = 1;
      }
    }
  }
  if (tr == 1) {
    if (trg == 1) {
      cout << "YES" << endl;
    } else {
      if (trg == 0) cout << "YES" << endl;
    }
  }
  return 0;
}
