input: Write a function to perform arithmetic operations on fractions.
  assert (Fraction(1, 2) + Fraction(1, 3)).a == 5 and (Fraction(1, 2) + Fraction(1, 3)).b == 6
  assert (Fraction(2, 3) - Fraction(1, 2)).a == 1 and (Fraction(2, 3) - Fraction(1, 2)).b == 6
  assert (Fraction(2, 3) * Fraction(3, 4)).a == 6 and (Fraction(2, 3) * Fraction(3, 4)).b == 12
output: from math import gcd
  
  class Fraction:
      def __init__(self, a, b):
          self.a = a
          self.b = b
  
      def __add__(self, other):
          num = self.a * other.b + self.b * other.a
          den = self.b * other.b
          common_divisor = gcd(num, den)
          return Fraction(num // common_divisor, den // common_divisor)
  
      def __sub__(self, other):
          num = self.a * other.b - self.b * other.a
          den = self.b * other.b
          common_divisor = gcd(num, den)
          return Fraction(num // common_divisor, den // common_divisor)
  
      def __mul__(self, other):
          num = self.a * other.a
          den = self.b * other.b
          common_divisor = gcd(num, den)
          return Fraction(num // common_divisor, den // common_divisor)