class Fraction:
    def __init__(self,a,b):
        self.num, self.denom = a , b
    def pgcd(self,a,b):
        if b == 0: return a
        else:
            r = a % b
            return self.pgcd( b , r)
    def simplify(self):
        a = self.num // self.pgcd(self.num , self.denom)
        b = self.denom // self.pgcd(self.num , self.denom)
        return Fraction(a,b)
    def __eq__(self,y):
        return self.num * y.denom == self.denom * y.num

x , y = Fraction(12,9) , Fraction(4,3)
print(x == y)