finish geometric-gcd