Example 4 (2002 Girls' Mathematical Olympiad) Find all positive integer pairs $(x, y)$ that satisfy $x^{y}=y^{x-y}$.
If $x=1$, then $y=1$; if $y=1$, then $x=1$.
If $x=y$, then $x^{y}=1$, so $x=y=1$.
Figure 1-1

Now consider the case $x>y \geqslant 2$. By the problem statement,
$$
12 y$, and $x$ is a multiple of $y$.
Let $x=k y$, then $k \geqslant 3$, and
$$
k^{y}=y^{(k-2) y} \text {, }
$$

so $k=y^{k-2}$.
Since $y \geqslant 2$, we have $y^{k-2} \geqslant 2^{k-2}$. It is easy to prove by mathematical induction or the binomial theorem that when $k \geqslant 5$, $2^{k}>4 k$, hence $k$ can only be 3 or 4.
When $k=3$, $y=3, x=9$; when $k=4$, $y=2, x=8$.
Therefore, all the required pairs of positive integers are $(1,1),(9,3),(8,2)$.