class Fraction:
    up: int
    low: int

    def __init__(self, up, low):
        self.up = up
        self.low = low

    def __add__(self, other):
        new_up = self.up * other.low + self.low * other.up
        new_low = self.low * other.low
        return Fraction(new_up, new_low)

    def __str__(self):
        return str(self.up) + "/" + str(self.low)

    def __mul__(self, other):
        new_up = self.up * other.up
        new_low = self.low * other.low
        return Fraction(new_up, new_low)

    def __eq__(self, other):
        return self.up * other.low == self.low * other.up

    def __lt__(self, other):
        return self.up * other.low < self.low * other.up

    def __abs__(self):
        return Fraction(abs(self.up), self.low)


fr1 = Fraction(-1, 3)
fr2 = Fraction(1, 3)
fr3 = Fraction(2, 3)
print(abs(fr2))

print(fr3.up, fr3.low)
