import sys
import collections


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    d = collections.deque(list("keyence"))
    s = str(input().rstrip('\n'))
    for i in range(len(s)):
        if len(p) == 0:
            break
        else:
            p = d.popleft()
            if p != s[i]:
                d.appendleft(p)
    print("YES" if len(d) == 0 else "NO")


if __name__ == '__main__':
    solve()
