def __init__(self, num, den):
    g = math.gcd(num, den)
    self.num = (num // g)
    self.den = (den // g)
def __init__(self, num, den):
    g = math.gcd(num, den)
    self.num = (num // g)
    self.den = (den // g)