## Task 16/84

We are looking for all pairs $(p ; q)$ of prime numbers for which $P=p^{2}+q^{2}-167$ and $Q=p^{2}-q^{2}+167$ are also prime numbers.
If $p=q=3$, then $P0, Q=176-q^{2}>0$ is $1580$ and $Q=p^{2}+158>0$. Since $p \neq 3$, $p \equiv \pm 1(\bmod 3), p^{2} \equiv 1(\bmod 3)$. Consequently, $Q \equiv 1+158 \equiv 0(\bmod 3)$ and thus can never be a prime number. This case is therefore not possible.
3. Let $p \neq 3, q \neq 3$ so $p^{2} \equiv q^{2} \equiv 1(\bmod 3)$. Then

$$
P \equiv 1+1-167 \equiv 0\left(\bmod 3 ; \text { so } P=3 \quad ; \quad p^{2}+q^{2}=P+167=170\right.
$$

which implies $p ; q<13$. From the now remaining 16 value pairs ($p ; q=$ $2 ; 5 ; 7 ; 11$), only the pair $\left(p_{2} ; q_{2}\right)=(11 ; 7)$ satisfies both equations. Thus, exactly the two pairs $\left(p_{1} ; q_{1}\right)=(3 ; 13)$ and $\left(p_{2} ; q_{2}\right)=(11 ; 7)$ meet the conditions of the problem.