def main():
    S = input()
    exam = list("keyence")
    count = 0
    flag = False
    over = 0

    for s in S:
        if len(exam) == 0:
            over += 1
        if over == 1:
            break
        if (s == exam[0]) & (flag == False):
            exam.pop(0)
        elif flag == False:
            flag = True
            count += 1
        elif (flag == True) & (s == exam[0]):
            exam.pop(0)
            flag = False




    if (count <= 1) & (len(exam) == 0) & (over == 0):
        print("YES")
    else:
        print("NO")

    return 0

if __name__ == '__main__':
    main()