how to find the greatest common divisor in python