s = input()
match_count = 0
match_string = "keyence"
deprecate_count = 0
deprecate_status = 0
ans = False
for i in s:
    if i == match_string[match_count]:
        deprecate_status = 1
        match_count += 1
        if match_count == len(match_string):
            ans = True
            break
    else:
        if deprecate_status == 1:
            deprecate_status = 2
            deprecate_count += 1
if ans and deprecate_count <= 1:
    print("YES")
else:
    print("NO")