Polynomial $(x − a)^2(x − b)^2 + 1$ is not the product of two polynomials with integral coefficients 
Let $a, b$ be integers. Then the polynomial $(x − a)^2(x − b)^2 + 1$ is not the product
  of two polynomials with integral coefficients.

Suppose $(x − a)^2(x − b)^2 + 1 = p(x)q(x)$ then $p(a)q(a)=1$, so $p(a)=q(a)=1$ or $p(a)=q(a)=-1$, thus $x-a \mid  p(x)-1$ and  $x-a \mid  q(x)-1$ or $x-a \mid  p(x)+1$ and  $x-a \mid  q(x)+1$ and i stopped there.
 A: More generally, let $a_1$, ..., $a_n$ be integers. We will show that
$$
f(x) = (x-a_1)^2 \cdots (x-a_n)^2 + 1
$$
is not the product of two polynomials with integer coefficients (and positive degrees!).
Continuing your approach, if $f(x)=p(x)q(x)$ then we have $1 = f(a_i) = p(a_i)q(a_i)$ for all $i$, so $p(a_i)=q(a_i)=+1$ or $p(a_i)=q(a_i)=-1$.
Note that $f$ is positive everywhere (it has no real roots). This implies that $p$ and $q$ have no real roots, so they cannot change sign. So either $p(a_i)=q(a_i)=+1$ for all $i$ or $p(a_i)=q(a_i)=-1$ for all $i$. Replacing $(p,q)$ by $(-p,-q)$ if necessary, we can assume that $p(a_i)=q(a_i)=1$ for all $i$.
Notice that this implies that $p(x)-1$ and $q(x)-1$, not being the zero polynomial, have degree at least $n$. Since $p(x)q(x)$ has degree $2n$, this implies that both $p(x)$ and $q(x)$ have degree exactly $n$. 
Let us now write $p(x) = r(x-a_1)\cdots(x-a_n)+1$ and $q(x)=s(x-a_1)\cdots(x-a_n)+1$. Then plugging this in in $f(x)=p(x)q(x)$ quickly reveals that $r=s=\pm1$. Expanding $f(x)=p(x)^2$ then easily gives a contradiction.
A: Hint: You know $p(a) = q(a)$ and $p(b) = q(b)$, and also from comparing leading coefficients in $(x − a)^2(x − b)^2 + 1 = p(x)q(x)$ the leading coefficients of $p,q$ are same. So, $p(x) - q(x)$ is a polynomial with at least two roots (i.e., at least of degree $2$, when $a \neq b$). The $a = b$ case is easy to handle.
