Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Unfortunately, this argument seems to break down when there are three primes $p,q,r$. What could happen that $n_p=n_q<n_r$. Then if $(n_r|p)=-1$ and $(n_r|q)=1$ I don't see the same trick working.
@GerryMyerson Yes, the question is a bit open to interpretation, but I am just hoping to understand what, for instance sets $x^2y$ (for which each specialization gives a square) apart from $x^2+y$ for which almost no specialization gives a square.