Let $g(x)\in \mathbb{Z}[x]$ be a nonconstant polynomial. Show that the set of primes $p$ such that $p\mid g(n)$ for some $n\in \mathbb{Z}$ is infinite.
I don't know how to start. I have tried assuming that the set is finite but i haven't reached any contradiction.
Assume that there are only finitely many such primes $p_1, p_2, ..., p_r$, and let $q = p_1 p_2 \cdots p_r$. Let $g(0) = c$. If $c = 0$, the result is obvious, so assume $c \ne 0$. For integer values of $x$, we have $$g(cqx) \equiv c \pmod{cq}.$$ For large enough values of $x$, we have $g(cqx) \ne \pm c$, and then $g(cqx)$ must have a prime divisor that is prime to $q$.