12.152 Find all pairs of integers $(a, b)$, where $a \geqslant 1, b \geqslant 1$, that satisfy the equation $a^{b^{2}}=b^{a}$.
(38th International Mathematical Olympiad, 1997)
[Solution] When one of $a, b$ equals 1, then the other must also be 1, so there is one solution:
$$
(a, b)=(1,1) \text {. }
$$

And $a t=b^{2}=a^{2 t}$.
Thus $t=a^{2 t-1}$, with $t>0$.
If $2 t-1 \geqslant 1$, then
$$
t=a^{2 t-1} \geqslant(1+1)^{2 t-1} \geqslant 1+(2 t-1)=2 t>t
$$

This is a contradiction, so $2 t-1 \geqslant 1$ is not true, thus $2 t-1<1$ which implies $t<1$.
Let $t=\frac{1}{k}, k \in \mathbb{N}, k>1$.
From $a t=b^{2}$, we have $a b^{2}=b^{2 k}=a^{2}$, so $a=b^{k}$, where $k>1$.
Let $k=\frac{p}{q}, p, q \in \mathbb{N}, (p, q)=1$, 
since $k>2$, we have $p>2 q$.
From (2), we get $\left(\frac{p}{q}\right)^{q}=k^{q}=b^{p-2 q} \in \mathbb{Z}$.

This implies $q^{q} \mid p^{q}$.
But $(p, q)=1$, so $q=1$.
Thus $k$ is a natural number greater than 2.
When $b=2$, from (2) we get $k=2^{k-2}>2$, so $k \geqslant 4$.
From $k=2^{k-2} \geqslant C_{k-2}^{0}+C_{k-2}^{1}+C_{k-2}^{2}$
$$
\begin{array}{l}
=1+(k-2)+\frac{(k-2)(k-3)}{2} \\
=1+\frac{(k-1)(k-2)}{2} \geqslant 1+k-1=k .
\end{array}
$$

Equality holds if and only if $k=4$, so $a=b^{k}=2^{4}=16$.
Thus, we have the solution $(a, b)=(16,2)$.
When $b \geqslant 3$, $k=b^{k-2} \geqslant(1+2)^{k-2} \geqslant 1+2(k-2)=2 k-3$.
Thus $k \leqslant 3$. Since $k>2$, we have $k=3$.
So $b=3, a=b^{k}=3^{3}=27$.
Thus, we have the solution $(a, b)=(27,3)$.
In summary, the solutions to this problem are $(1,1),(16,2),(27,3)$.