10. (1997, 38th IMO) Find all pairs of integers $(a, b)$, where $a \geqslant 1, b \geqslant 1$, that satisfy the equation $a^{b^{2}}=b^{a}$.
10. If $a=1$, then from the equation we get $b=1$.

If $b=1$, then from the equation we get $a=1$.
If $a, b$ are both not less than 2, at this time, we let $t=\frac{b^{2}}{a}$
From the equation in the problem, we get
$$
a^{u t}=(a t)^{\frac{u}{2}} \text {, i.e., } a^{2 t}=a t, t=a^{2 t-1} .
$$

Obviously $t>0$, if $2 t-1 \geqslant 1$, then
$$
t=a^{2 t-1} \geqslant(1+1)^{2 t \cdots 1} \geqslant 1+(2 t-1)=2 t>t,
$$

which is a contradiction. Therefore, $2 t-11$ is a rational number. From the equation in the problem, we get $a^{\frac{a}{k}}=b^{a}$, i.e., $a=b^{k}, b^{2} k=b^{k}, k=b^{k-2}$.
If $k \leqslant 2$, then $k=b^{k-2} \leqslant 1$, which contradicts the previously proven $k>1$. Therefore, $k>2$. Let
$$
k=\frac{p}{q}, p, q \in \mathbf{N},(p, q)=1, p>2 q .
$$

From equation (1), we get
$$
\left(\frac{p}{q}\right)^{q}=k^{q}=b^{p}{ }^{2 q} .
$$

Since the right side of the above equation is an integer, we have $q=1$, thus $k$ is a natural number greater than 2, i.e., $k \geqslant 3$.
If $b=2$, then from equation (1) we get $k=2^{k}{ }^{2}$.

It is easy to see that in this case $k \neq 3$, thus $k \geqslant 4$. On the other hand, from equation (1) we know
$$
\begin{aligned}
k & =(1+1)^{k-2} \geqslant C_{k 2}^{0}+C_{k-2}^{1}+C_{k-2}^{2} \\
& =1+(k-2)+\frac{(k-2)(k-3)}{2} \\
& =1+\frac{(k-1)(k-2)}{2} \geqslant 1+(k-1)=k .
\end{aligned}
$$

Since the equality in the above equation holds if and only if $k=4$, we have $k=4$,
$$
a=b^{k}=2^{4}=16 .
$$

If $b \geqslant 3$, then $k=b^{k} 2 \geqslant(1+2)^{k-2} \geqslant 1+2(k-2)=2 k-3$,
i.e., $k \leqslant 3$.
Therefore, in this case, we must have $k=3$, substituting into (1) we get $b=3, a=b^{k}=3^{3}=27$.
In summary, all positive integer pairs $(a, b)$ that satisfy the equation in the problem are $(a, b)=(1,1),(16,2)(27,3)$.