#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  cout << s.length() << " " << s.rfind("keyence") + 7 << endl;
  if (s.find("keyence") == 0) {
    cout << "YES" << endl;
  } else if (s.rfind("keyence") + 7 == s.length()) {
    cout << "YES" << endl;
  } else if (s.find("key") == std::string::npos ||
             s.find("ence") == std::string::npos) {
    cout << "NO" << endl;
    return 0;
  } else if (s.find("key") < s.find("ence")) {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
