4. Find all pairs of prime numbers $(p, q)$ such that $p q \mid\left(5^{p}+5^{q}\right)$.
(2009, China Mathematical Olympiad)
(1) $\min \{p, q\}=2$.

By symmetry, we may assume $p=2$. Then $2 q \mid\left(25+5^{q}\right)$.
By Fermat's Little Theorem, we know $5^{q} \equiv 5(\bmod q)$.
Thus, $25+5^{q} \equiv 30 \equiv 0(\bmod q)$
$\Rightarrow q \mid 30 \Rightarrow q=2,3$ or 5.
Upon verification, $q=3,5$ satisfy the given conditions.
Therefore, when $\min \{p, q\}=2$, the prime pairs $(p, q)=(2,3),(2,5),(3,2),(5,2)$ satisfy the conditions.
(2) $p \geqslant 3, q \geqslant 3$, and one of $p, q$ is 5.

By symmetry, we may assume $p=5$. Then
$5 q\left|\left(5^{5}+5^{q}\right) \Rightarrow q\right|\left(5^{4}+5^{q-1}\right)$.
When $q=5$, it clearly satisfies the condition.
When $q \neq 5$, by Fermat's Little Theorem, we know
$$
5^{q-1} \equiv 1(\bmod q).
$$

Then $5^{4}+5^{q-1} \equiv 5^{4}+1 \equiv 2 \times 313(\bmod q)$
$$
\Rightarrow q \mid 2 \times 313 \Rightarrow q=313.
$$

Therefore, when $\min \{p, q\}=5$, the prime pairs $(p, q)=(5,5),(5,313),(313,5)$ satisfy the conditions.
(3) $p \geqslant 3, q \geqslant 3$, and $5 \mid p q$.

Then $p q\left|\left(5^{p}+5^{q}\right) \Rightarrow p q\right|\left(5^{p-1}+5^{q-1}\right)$.
By Fermat's Little Theorem, we know
$$
5^{p-1} \equiv 1(\bmod p), 5^{q} \equiv 1(\bmod q).
$$

Thus, $5^{q-1} \equiv-1(\bmod p), 5^{p-1} \equiv-1(\bmod q)$.
Let the half-orders of 5 modulo $p, q$ be $\lambda_{1}, \lambda_{2}$, respectively. Then the orders of 5 modulo $p, q$ are $2 \lambda_{1}, 2 \lambda_{2}$, respectively.

Notice,
$$
5^{q-1} \equiv-1(\bmod p), 5^{p-1} \equiv-1(\bmod q).
$$

Thus, $\frac{q-1}{\lambda_{1}} \cdot \frac{p-1}{\lambda_{2}}$ is odd.
Also, $5^{p-1} \equiv 1(\bmod p), 5^{q} \equiv 1(\bmod q)$, so $2 \lambda_{1}\left|(p-1), 2 \lambda_{2}\right|(q-1)$.
Therefore, $4 \left\lvert\, \frac{p-1}{\lambda_{1}} \cdot \frac{q-1}{\lambda_{2}}\right.$.
This contradicts conclusion (1), so there is no solution in this case.
In summary, the prime pairs that satisfy the conditions are
$$
\begin{aligned}
(p, q)= & (2,3),(2,5),(3,2),(5,2), \\
& (5,5),(5,313),(313,5).
\end{aligned}
$$

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