gcd with recursive Euclid method