#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1000000007;
int main() {
  string S;
  cin >> S;
  string key = {"keyence"};
  vector<int> nn(7, -1);
  int aa = 0;
  int bb = 0;
  if (S == key) {
    cout << "YES" << endl;
    return 0;
  }
  if (S[0] != 'k' && S[S.length() - 1] != 'e') {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < S.length(); i++) {
    if (S[i] != key[i]) {
      aa = i;
      break;
    }
  }
  int p = 6;
  for (int i = S.length() - 1; i >= 0; i--, p--, bb++) {
    if (S[i] != key[p]) {
      break;
    }
  }
  cout << aa << " " << bb << endl;
  if (aa + bb == 7) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
