Problem

Source: Hong Kong TST3 P1

Tags: number theory, prime numbers



Find all prime numbers $p$ and $q$ such that $p^2|q^3+1$ and $q^2|p^6-1$