gcd and isprime