Prove that if $a_1, a_2, \cdots , a_n$ are all distinct, then $$f(x)=1+\prod_{i=1}^{n}(x-a_i)^2$$ can never be written as the product of two polynomials with integer coefficients.
Write ${f(x)=g(x)h(x)}$. Then, $f(a_i)=1=g(a_i)h(a_i)$. Now, if both $g(a_i)$ and $h(a_i)$ equals $+1$ or $-1$ for all $i\in\{1,2,\cdots, n\}$ then, we can say that $g(x)-1$ or $g(x)+1$ will have $n$ roots. Now since there can be at most of $n$ roots for $g(x)$ assuming that $\text {deg}(g(x)) \leq \text {deg}(h(x))$, we get that there exists all $n$ roots. Then continuing that way we get a contradiction.
But what if for some $i \in \{1,2,\cdots , n\}$, we have $g(a_i)=1$ and for the rest $g(a_i)=-1$? It may be possible because $g(a_i) h(a_i)=1=\{(1,1),(-1,-1)\}$
EDIT (Please check) : A link has been provided below but $g(a_i)h(a_i)=1$ also implies that $g(a_i)=h(a_i)=-1$ for $i=\{1,2,\cdots , k\} \ni k < n\}$ and $g(a_i)=h(a_i)=1$ for $i=\{k+1,k+2,\cdots, n\}$. And this case isn't justified in that thread.