output_description: Print the minimum number of pieces that can be evenly distributed to the
  guests in both of the cases with A guests and B guests.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B
attempt: import math
  
  
  def resolve():
      A, B = [int(i) for i in input().split()]
  
      answer = greatest_common_divisor(A, B)
  
      print(answer)
  
  
  def trial_division(n):
      prime_factors = []
      if n < 2:
          prime_factors.append(n)
          return prime_factors
      for i in (1, math.ceil(int(n / 2)), 1):
          if (n % i) == 0:
              prime_factors.append(i)
      prime_factors.append(n)
      return prime_factors
  
  
  def least_common_multiple(a, b):
      a_list = trial_division(a)
      b_list = trial_division(b)
      a_b_and_list = set(a_list) & set(b_list)
      lcm = 1
      if a_b_and_list:
          for i in a_b_and_list:
              lcm = lcm * i
      return lcm
  
  
  def greatest_common_divisor(a, b):
      a_list = trial_division(a)
      b_list = trial_division(b)
      a_b_and_list = set(a_list) ^ set(b_list)
      gcd = 1
      if a_b_and_list:
          for i in a_b_and_list:
              gcd = gcd * i
      return gcd
  
  
  if __name__ == "__main__":
      resolve()
  
problem_description: Statement
  
  Takahashi is organizing a party.
  
  At the party, each guest will receive one or more snack pieces.
  
  Takahashi predicts that the number of guests at this party will be A or B.
  
  Find the minimum number of pieces that can be evenly distributed to the guests
  in both of the cases predicted.
  
  We assume that a piece cannot be divided and distributed to multiple guests.
samples: [{"input": "2 3", "output": "6\n    \n\nWhen we have six snack pieces, each guest can take three pieces if we have two\nguests, and each guest can take two if we have three guests.\n\n* * *"}, {"input": "123 456", "output": "18696\n    \n\n* * *"}, {"input": "100000 99999", "output": "9999900000"}]