12. Find all pairs of positive integers $(m, n)$ that satisfy $1 \leqslant m^{n}-n^{m} \leqslant m n$.

 untranslated text remains the same as requested.
Obviously, when $m \geqslant 2$, $n=1$ satisfies the condition;
When $m=2$, $n=5$ satisfies the condition;
For $n \geqslant 6$, let the function $f(x)=2^{x}-x^{2}-2 x, f^{\prime}(x)=2^{x} \ln 2-2 x-2, f^{\prime \prime}(x)=2^{x}(\ln 2)^{2}-2>0$, then $f^{\prime}(x)$ is monotonically increasing $\Rightarrow f^{\prime}(6)=2^{6} \ln 2-14>0 \Rightarrow f(x)$ is monotonically increasing, and $f(6)=16>0$, which does not meet the condition.

Thus, at this point, only $(m, n)=(2,5)$ satisfies the condition;
When $m=3$, $n=2$ satisfies the condition;
For $n \geqslant 4$, let $g(x)=3^{x}-x^{3}-3 x, g^{\prime}(x)=3^{x} \ln 3-3 x^{2}-3, g^{\prime \prime}(x)=3^{x}(\ln 3)^{2}-6 x>0$, then $g(x)$ is monotonically increasing, and $g(4)=5>0$, which does not meet the condition. Thus, at this point, only $(m, n)=(3,2)$ satisfies the condition; when $m \geqslant 4, n \geqslant m+1$, let $h(x)=m^{x}-x^{m}-m x, h^{\prime}(x)=m^{x} \ln m-m x^{m-1}-m$, by the function $y=\frac{\ln x}{x}$ being monotonically decreasing on $(\mathrm{e},+\infty)$ $\Rightarrow \frac{\ln x}{x}x^{m}-m x^{m-1}-m=(x-m) x^{m-1}-m \geqslant x^{m-1}-m>0 \Rightarrow h(x)$ is monotonically increasing, and $h(m+1)=m^{m+1}-(m+1)^{m}-m(m+1)=m^{m}\left[m-\left(1+\frac{1}{m}\right)^{m}\right]-m(m+1)$, in the inequality $\ln (1+x)0)$, take $x=\frac{1}{m} \Rightarrow \ln \left(1+\frac{1}{m}\right)m^{m}-m(m+1)>0$, which does not meet the condition. Thus, at this point, there is no solution for $(m, n)$. In summary, all $(m, n)$ that satisfy the condition are $(m, 1)(m \geqslant 2),(2,5),(3,2)$.