use sympy.Rational instead of Fraction