Problem

Source: Polish MO Finals P3 2024

Tags: number theory, number theory proposed, prime numbers, system of equations, Diophantine equation



Determine all pairs $(p,q)$ of prime numbers with the following property: There are positive integers $a,b,c$ satisfying \[\frac{p}{a}+\frac{p}{b}+\frac{p}{c}=1 \quad \text{and} \quad \frac{a}{p}+\frac{b}{p}+\frac{c}{p}=q+1.\]