Try to solve x^2 = a (mod n)