class Rational:
    """
    A rational number

    Attributes:
    ===========
    @type num: int
        numerator of rational number
    @type denom: int
        denominator of rational number
    """

    def __init__(self, num, denom):
        """
        Create new Rational self with numerator num and
        denominator denom --- denom must not be 0.

        @type self: Rational
        @type num: int
        @type denom: int
        @rtype: None
        """
        self.num, self.denom = int(num), int(denom)

    def __eq__(self, other) ->bool:
        """
        Return whether Rational self is equivalent to other.

        @type self: Rational
        @type other: Rational | Any
        @rtype: bool

        >>> r1 = Rational(3, 5)
        >>> r2 = Rational(6, 10)
        >>> r3 = Rational(4, 7)
        >>> r1 == r2
        True
        >>> r1.__eq__(r3)
        False
        """
        return self.num * other.denom == self.denom * other.num


    def __lt__(self, other):
        """
        Return whether Rational self is less than other.

        @type self: Rational
        @type other: Rational
        @rtype: bool

        >>> Rational(3, 5).__lt__(Rational(4, 7))
        False
        >>> Rational(3, 5).__lt__(Rational(5, 7))
        True
        """
        return self.num * other.denom < self.denom * other.num

    def __str__(self: 'Rational') -> str:
        """
        Return a user-friendly string representation of
        Rational self.

        @type self: Rational
        @rtype: str

        >>> print(Rational(3, 5))
        3 / 5
        """
        return "{} / {}".format(self.num, self.denom)


    def __mul__(self, other):
        """
        Return the product of Rational self and Rational other.

        @type self: Rational
        @type other: Rational
        @rtype: Rational

        >>> print(Rational(3, 5).__mul__(Rational(4, 7)))
        12 / 35
        """
        return Rational (self.num * other.num, self.denom * other.denom)

    def __add__(self, other:'Point')->'Point':
        """
        Return the sum of Rational self and Rational other.

        @type self: Rational
        @type other: Rational
        @rtype: Rational

        >>> print(Rational(3, 5).__add__(Rational(4, 7)))
        41 / 35
        """
        return Rational(self.num * other.denom + self.denom * other.num,
                        self.denom * other.denom)





if __name__ == "__main__":
    import doctest
    doctest.testmod()

    r1 = Rational(3, 5)
    r2 = Rational(7, 4)
    print(r1 < r2)
    print(r1 + r2)
    print(r1 * r2)
    print(r1 == r2)
