#include <cstdio>
#include <climits>
#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <cmath>
#include <stack>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <functional>
#include <numeric>
#include <chrono>
#include <cstdlib>
using ll = long long;
using namespace std;

const ll MOD = 1e9 + 7;
#define REP(i, n) for (int(i) = 0; (i) < (n); ++(i))
#define repi(i, a, b) for (int i = int(a); i < int(b); ++i)
// bool operator<(const pair<int, int> &a, const pair<int, int> &b)
// {
//     if (a.first == b.first)
//         return a.second < b.second;
//     return a.first < b.first;
// };

/*unsigned int xor128(void)
{
    static unsigned int x = 123456789, y = 362436069, z = 521288629, w = 88675123;
    unsigned int t = (x ^ (x << 11));
    x = y;
    y = z;
    z = w;
    return (w = (w ^ (w >> 19)) ^ (t ^ (t >> 8)));
}
unsigned int xor128rnd(unsigned int m)
{
    return xor128() % m;
}*/

/*bool operator<(const pair<int, int> &a, const pair<int, int> &b)
{
    if (a.first == b.first)
    {
        return a.second < b.second;
    }
    return a.first < b.first;
}*/

int N, H, W;
ll A[100010], B[100010];
vector<pair<ll, ll>> v1;
vector<ll> v2;

int main()
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    //cout << fixed << setprecision(12);

    string s;
    cin >> s;
    string t = "keyence";

    vector<int> v;
    for (int i = 0; i < (int)s.size(); ++i)
    {
        if (s[i] == t[0])
        {
            for (int j = i + 1; j < (int)s.size(); ++j)
            {
                if (s[j] == t[1])
                {
                    for (int k = j + 1; k < (int)s.size(); ++k)
                    {
                        if (s[k] == t[2])
                        {
                            for (int l = k + 1; l < (int)s.size(); ++l)
                            {
                                if (s[l] == t[3])
                                {
                                    for (int m = l + 1; m < (int)s.size(); ++m)
                                    {
                                        if (s[m] == t[4])
                                        {
                                            for (int n = m + 1; n < (int)s.size(); ++n)
                                            {
                                                if (s[n] == t[5])
                                                {
                                                    for (int p = n + 1; p < (int)s.size(); ++p)
                                                    {
                                                        if (s[p] == t[6])
                                                        {
                                                            int pp = 0;
                                                            if (i != 0)
                                                                pp++;
                                                            if (j - i > 1)
                                                                pp++;
                                                            if (k - j > 1)
                                                                pp++;
                                                            if (l - k > 1)
                                                                pp++;
                                                            if (m - l > 1)
                                                                pp++;
                                                            if (n - m > 1)
                                                                pp++;
                                                            if (p - n > 1)
                                                                pp++;
                                                            if (s.size() - p > 1)
                                                                pp++;
                                                            if (pp <= 1)
                                                            {
                                                                cout << "YES" << endl;
                                                                return 0;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    cout << "NO" << endl;

    return 0;
}

Measured memory_bytes: 256