https://wikimass.com/python/common-divisors