Returns the greatest common factor of two numbers.