https://wikimass.com/php/gcd