https://wikimass.com/java/gcd