3. Find all pairs of prime numbers $p$ and $q$, for which $p^{2}+p q+q^{2}$ is a perfect square.
Answer: $(3,5)$ and $(5,3)$.

The equality $p^{2}+p q+q^{2}=a^{2}$, implied in the problem, can be rewritten as follows:

$$
p q=(p+q)^{2}-a^{2}=(p+q-a)(p+q+a) \text {. }
$$

Since the factor $p+q+a$ on the right side is greater than both $p$ and $q$, and using the fact that $p$ and $q$ are prime numbers, we conclude that $p+q-a=1$ and $p+q+a=p q$. Adding these equations, we conclude that $2(p+q)=p q+1$. The last equation can be rewritten as

$$
(p-2)(q-2)=3
$$

from which we obtain two pairs of solutions: $(p, q)=(3,5)$ and $(p, q)=(5,3)$.

## Criteria

+ Correct solution - 7 points.

+. An arithmetic error in the final part of the solution, which does not affect its essence but may distort the answer - 6 points.

$\pm$ The problem is reduced to solving the equation $p q-2(p+q)+1=0$ or an equivalent one, but there is no further progress - 4 points.

$\mp$ The condition is rewritten in the form $p q=(p+q-a)(p+q+a)$, but there is no further progress - 2 points.

-. Correct answer without justification (or with incorrect justification) - 1 point.

Not verifying that the answers fit - points are not deducted.

Only one pair of numbers is listed instead of two - points are not deducted.