Abstract
Under the assumption of twice continuous differentiability of some of the functions involved we determine all the weighted quasi-arithmetic means $M,N,K$ such that $K$ is $(M,N)$-invariant, that is, $K\circ (M,N)=K.$ Some applications to iteration theory