#include <bits/stdc++.h>
using namespace std;
long long a, b, c, d, i, e, f, g, n, m, k, l, A[10];
string s, s1, s2, s3;
int main() {
  cin >> s;
  s3 = "keyence";
  for (long long i = 0; i < 7; i++) s1 += s[i];
  if (s1 == "keyence") {
    cout << "YES";
    return 0;
  }
  for (long long i = s.size() - 7; i < s.size(); i++) s2 += s[i];
  if (s2 == "keyence") {
    cout << "YES";
    return 0;
  }
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] == s3[l]) {
      k = 1;
      l++;
    } else if (s[i] != s3[l] && k != 1) {
      cout << "NO";
      return 0;
    } else if (s[i] != s3[l] && k == 1)
      break;
  }
  f = 6;
  k = 0;
  for (long long i = s.size() - 1; i >= 0; i--) {
    if (s[i] == s3[f]) {
      k = 1;
      f--;
    } else if (s[i] != s3[f] && k != 1) {
      cout << "NO";
      return 0;
    } else if (s[i] != s3[f] && k == 1)
      break;
  }
  if (l + 6 - f == 7)
    cout << "YES";
  else
    cout << "NO";
}
