Prove that having three distinct solutions of the conguence $\displaystyle x^2=y\mod n$, where $\displaystyle n,\,y$ are known and $\displaystyle n=pq$ is a product of distinct primes, we can find $\displaystyle p$ and $\displaystyle q$ efficiently.

I've managed to prove, with the Chinese remainder theorem, that the congruence always has four distinct solutions and that we can easily find the fourth solution when we have three.