Let $n$ be the product of two large prime numbers, and assume that a black box is given that computes square roots. That is, given a quadratic residue $y$, the box outputs an $x$ with $x^2=y$ (equation is modulo $n$ ). Show how the box can be used to factor $n$.