3. Find all pairs of prime numbers $(p, q)$ such that $p q \mid\left(p^{p}+q^{q}+1\right)$.
(2007, Korean Mathematical Olympiad)
If $p=q$, then $p^{2} \mid\left(2 p^{p}+1\right)$. This is impossible. By symmetry, we may assume $p<q$.
From the condition, we have
$$
p q \left\lvert\,\left(p^{p}+q^{q}+1\right) \Leftrightarrow\left\{\begin{array}{l}
p \mid\left(q^{q}+1\right), \\
q \mid\left(p^{p}+1\right) .
\end{array}\right.\right.
$$

We discuss in cases.
(1) If $p=2$, then $q \mid\left(2^{2}+1\right) \Rightarrow q=5$.
(2) If $p \geqslant 3$, in this case, $p$ and $q$ are both odd primes.

From $p \mid\left(q^{q}+1\right) \Rightarrow q^{q} \equiv-1(\bmod p)$
$$
\Rightarrow q^{2 q} \equiv 1(\bmod p).
$$

Also, by Fermat's Little Theorem, $q^{p-1} \equiv 1(\bmod p)$.
Let the order of $q$ modulo $p$ be $\lambda_{1}$. Then
$$
\lambda_{1}\left|2 q, \lambda_{1}\right|(p-1), \lambda_{1} \nmid q.
$$

Therefore, $\lambda_{1} \mid(2 q, p-1)$.
Noting that $p<q$.
Hence $(2 q, p-1)=2$.
Thus, $\lambda_{1} \mid 2$.
And $\lambda_{1} \nmid q$, so $\lambda_{1}=2$.
By the property of order, we have
$q^{2} \equiv 1(\bmod p), q \equiv 1(\bmod p)$.
Thus, $p\left|\left(q^{2}-1\right) \Rightarrow p\right|(q+1)(q-1)$
$\Rightarrow p \mid(q+1)$.
Since $q \mid\left(p^{p}+1\right)$, we have
$$
p^{p} \equiv-1(\bmod q) \Rightarrow p^{2 p} \equiv 1(\bmod q),
$$

and by Fermat's Little Theorem, $p^{q-1} \equiv 1(\bmod q)$.
Let the order of $p$ modulo $q$ be $\lambda_{2}$. Then
$\lambda_{2}\left|2 p, \lambda_{2}\right|(q-1), \lambda_{2} \nmid p$.
Therefore, $\lambda_{2} \mid(2 p, q-1)$.
Noting that $p \mid(q+1)$.
Hence $q-1 \equiv-2(\bmod p)$. Thus, $(2 p, q-1)=2$.
Thus, $\lambda_{2} \mid 2$.
And $\lambda_{2} \nmid q$, so $\lambda_{2}=2$.
By the property of order, we have
$$
\begin{aligned}
& p^{2} \equiv 1(\bmod q), \text { and } p \not \equiv 1(\bmod q) \\
& \Rightarrow q\left|\left(p^{2}-1\right) \Rightarrow q\right|(p+1)(p-1) \\
\Rightarrow & q \mid(p+1) .
\end{aligned}
$$

Since $p<q$, and $q \mid(p+1)$, thus, we can only have $q=p+1$.
But $p$ and $q$ are both odd primes, which is impossible.
In summary, the prime pairs that satisfy the condition are
$$
(p, q)=(2,5),(5,2).
$$

For detailed explanation, see the 2008 supplement of this journal.