Problem

Source: Czech-Polish-Slovak Junior Match 2014, Team p3 CPSJ

Tags: number theory, primes, prime



Find with all integers $n$ when $|n^3 - 4n^2 + 3n - 35|$ and $|n^2 + 4n + 8|$ are prime numbers.