gcd and sieve