Factoring and square roots