def solve(S):
    l = len('keyence')
    diff = len(S) - l
    if diff < 0:
        return 'NO'
    for i in range(len(S) - diff+1):
        t = S[:i] + S[i+diff:]
        if t == 'keyence':
            return 'YES'
    return 'NO'