Problem

Source: Baltic Way 2011

Tags: number theory proposed, number theory



Determine all pairs $(p,q)$ of primes for which both $p^2+q^3$ and $q^2+p^3$ are perfect squares.