s = list(input())
removed = False
removing = False
for i in range(len(s)):
    last = list("keyence")
    j = i
    while j < len(s):
        if s[j] == last[0]:
            del last[0]
        j += 1
        if not last:
            print("YES")
            exit()
    # 残り文字がlast = enceみたいになるので
    # sの末尾がlast = enceになっていればOK
    if j + len(last) <= len(s) and s[j:] == last:
        print("YES")
        exit()
print("NO")