#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  cin >> S;
  string key = "keyence";
  int size = S.length();
  int key_size = key.length();
  bool flag = false;
  int i = 0;
  int j = 0;
  for (i; i < size; i++) {
    if (S[i] == key[j]) {
      if (j == key_size - 1) flag = true;
      j++;
    }
  }
  cout << i << " " << j << endl;
  if (flag == true) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
