https://wikimass.com/python/lcm