#include <bits/stdc++.h>
using namespace std;
int main(void) {
  string s;
  int flag = 0;
  string w = "keyence";
  int idx = 0;
  int len;
  cin >> s;
  len = s.length();
  for (int i = 0; i < s.length(); i++) {
    if (w[idx] == s[i]) {
      idx++;
    }
    if (s[i] != 'k' && s[i] != 'e' && s[i] != 'y' && s[i] != 'e' &&
        s[i] != 'n' && s[i] != 'c' && s[i] != 'e' && flag == 0) {
      flag = 1;
    }
    if (s[i] == 'k' || s[i] == 'y' || s[i] == 'e' || s[i] == 'n' ||
        s[i] == 'c' && flag == 1) {
      flag = 2;
    }
    if (s[i] != 'k' && s[i] != 'e' && s[i] != 'y' && s[i] != 'e' &&
        s[i] != 'n' && s[i] != 'c' && s[i] != 'e' && flag == 2) {
      flag = 3;
    }
  }
  cout << idx << endl;
  if ((flag == 0 || flag == 2 || flag == 1) && 7 <= idx) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
