GCD, Miller-Rabin, and Pollard's rho