I am working on my scholarship practice exam which assumes high school or pre-university math knowledge and stuck at this question. Could you please have a look?
Let $p=n^2-18n+77$ for a natural number $n$. If $p>0$ and $p$ is prime, then $p=.....$
I started by factorizing the equation to $(n-7)(n-11)$ and drew the graph below.
I am not sure how to continue here. It seems that when $p>0$ or above $x$-axis, $p$ can be many values which are prime, seeing from the graph.
The answer provided is $5$. Please advise.

Hint: You know $p=(n-7)(n-11)$, so if $p$ is prime the two factors $n-7,n-11$ must be $1,p$ or $-1,-p$ in some order.