Congruence and quadratic residues Let $p_1$, $p_2$, $p_3$ be distinct primes satisfying $p_1 \equiv p_2 \equiv p_3 \equiv 5 \pmod 8$, such that $p_i$ is a quadratic residue modulo $p_j$ for any $i\neq j$. Prove that, for any prime $p$, there exist integers $x,y$ such that $y^2 \equiv p_1(x^2 - p_2p_3)(x^2 + p_2p_3) \pmod p$.
There are surely not many $x$ for which $x^2 \pm p_2p_3$ are both squares, but still I get confused in cases of "this is a square mod this prime" whatever I try.
Any help appreciated!
 A: The cases where $p\in\{p_1,p_2,p_3\}$ are easy, and I assume that $p\ne p_i$, $i\in\{1,2,3\}$. 
For brevity I write $P:=p_2p_3$; also, let $\left(\frac{\cdot}p\right)$ denote the Legendgre symbol. 
If either $P$ or $-P$ is a quadratic residue mod $p$, then we can take $y=0$ and choose $x$ appropriately; suppose thus that both $P$ and $-P$ are quadratic non-residues. Notice that this implies $\left(\frac{-1}p\right)=1$.
If $p_1$ is a quadratic residue mod $p$, then we can take $x=0$; suppose therefore that $p_1$ is a quadratic non-residue mod $p$. 
Clearly, with all the assumption made, it suffices to show that there exists $x\in\mathbb Z/p\mathbb Z$ such that one of $x^2-P$ and $x^2+P$ is a quadratic residue, while another is a quadratic non-residue mod $p$. 
Suppose for a contradiction that for each $x\in\mathbb Z/p\mathbb Z$ we have $\left(\frac{x^2-P}p\right)=\left(\frac{x^2+P}p\right)$. Replacing $x$ with $Px$ and using multiplicativity of the Legendre symbol,  we conclude that $\left(\frac{Px^2-1}p\right)=\left(\frac{Px^2+1}p\right)$, for all $x\in\mathbb Z/p\mathbb Z$. Recalling that $P$ is a quadratic non-residue, we further conclude that $\left(\frac{z+1}p\right)=\left(\frac{z-1}p\right)$ for any quadratic non-residue $z$, and also for $z=0$. 
Let $N_0\subset\mathbb Z/p\mathbb Z$ be the set containing all quadratic non-residues and $0$. Since $|N_0|=(p+1)/2>p/2$, this set contains two consecutive elements of $\mathbb Z/p\mathbb Z$; say, $z-1$ and $z$. But then also $z+1\in N_0$ and, consecutively, $z+2\in N_0$ etc. As a result, all elements of $\mathbb Z/p\mathbb Z$ are in $N_0$, meaning that there are no quadratic residues mod $p$. This is a clear nonsense, showing that $\left(\frac{x^2-P}p\right)=\left(\frac{x^2+P}p\right)$ cannot hold for all $x\in\mathbb Z/p\mathbb Z$. 
Notice that we have not used the assumption $p_1\equiv p_2\equiv p_3\equiv 5\pmod 8$ and $\left(\frac{p_i}{p_j}\right)=1$, $i\ne j$.
