S = list(str(input()))
correct = list("keyence")


def search():
    index = 0
    pre_false = 0
    num_false = 0
    flg = 1
    left_last_word = 0

    if S[:7] == correct:
        print("YES")
    elif S[len(S)-7:] == correct:
        print("YES")
    else:
        for now, s in enumerate(S):
            if s == correct[index]:
                index += 1
                pre_false = 0
            else:
                if pre_false == 0:
                    if num_false == 0:
                        left_last_word = index - 1
                    num_false += 1
                    pre_false = 1

            # contain keyence
            if index == len(correct):
                if num_false == 0:
                    flg = 0
                    print("YES")
                    break
                elif num_false == 1:
                    if now == len(S) - 1:
                        flg = 0
                        print("YES")
                        break
                    else:
                        num_false = 1
                        pre_false = 1
                        index = left_last_word + 1
                else:
                    flg = 0
                    print("NO")
                    break
        # not contain
        if flg:
            print("NO")
search()