16. Given the function $y=\log _{3} \frac{m x^{2}+8 x+n}{x^{2}+1}$ defined on $\mathbf{R}$, its maximum value is 2 and its minimum value is 0. Find the values of the real numbers $m$ and $n$.
16. Let $3^{y}=t$, then $(m-t) x^{2}+8 x+n-t=0$. Since $x \in \mathbf{R}$, we have $\Delta \geqslant 0$, i.e., $64-4(m-t)(n-t) \geqslant 0, t^{2}-(m+n) t+m n-16 \leqslant 0$. Also, since $0 \leqslant y \leqslant 2$, we get $1 \leqslant t \leqslant 9$, which means $(t-1)(t-9) \leqslant 0$, $t^{2}-10 t+9 \leqslant 0$. Therefore, $m+n=10, m n-16=9$, which gives $m=n=5$.