S = input()

len_s = len(S)
key_s = "keyence"
len_key_s = len(key_s)

def main(S, key_s):
    if len_s >= len_key_s:
        ok =True
        for char_i in range(len_key_s):
            if key_s[char_i] != S[char_i]:
                first_diff_i = char_i
                ok = False
                break

        if ok: # keyence + "abdedd"
            #print("YES")
            return True
        else:
            end_diff_i = None
            for rev_char_i in range(len_key_s):
                char_i = - rev_char_i - 1
                
                if key_s[char_i] != S[char_i]:
                    end_diff_i = char_i
                    break

            if end_diff_i is None:
                end_diff_i = - len_key_s - 1

            mod_S = S[:first_diff_i] + S[end_diff_i+1:]

            if mod_S == key_s:
                #print("YES")
                return True
            else:
                #print("NO")
                return False
    else:
        #print("NO")
        return False

res1 = main(S, key_s)
res2 = main(S[::-1], key_s[::-1])

res = res1 and  res2

out = "YES" if res else "NO"
print(out)