9.4. Find all triples of prime numbers $p, q, r$ such that the numbers $|q-p|,|r-q|,|r-p|$ are also prime.
Answer: $2,5,7$.

Solution. We can assume that $p2$, then all numbers $p, q, r$ are odd, and their differences $|q-p|,|r-q|,|r-p|$ are even. Then $|r-p|=r-p=r-q+q-r \geq 2+2=4$ cannot be a prime number, which contradicts the problem's condition. Therefore, $p=2$.

Then $q$ and $r$ are odd prime numbers, and their difference $r-q$ is an even prime number, so $r-q=2$, which means $r=q+2$. In this case, $q-p=q-2, q, q+2$ are three consecutive odd numbers, so one of them must be divisible by 3 (considering the remainders of $q$ divided by 3). The latter is only possible when $q-2=3$, that is, $q=5, r=7$.

Grading criteria. Only answers: 2 points. Proof that there are no other answers: 5 points.