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: #!python3
  
  
  def factor(n):
      ans = []
      i = 0
      while n & 1 == 0:
          n >>= 1
          i += 1
  
      if i > 0:
          ans.append((2, i))
  
      for i in range(3, int(n**0.5) + 1, 2):
          x, y = divmod(n, i)
  
          if y == 0:
              j = 1
              x1 = x
              while True:
                  x1, y = divmod(x, i)
                  if y == 0:
                      x = x1
                      j += 1
                  else:
                      ans.append((i, j))
                      break
              n = x
  
      if n > 1:
          ans.append((n, 1))
  
      return ans
  
  
  def resolve():
      A, B = map(int, input().rstrip().split(" "))
  
      fa = dict(factor(A))
      fb = dict(factor(B))
  
      a = A
      for k, v in fa.items():
          if k in fb:
              v2 = fb[k]
              if v < v2:
                  a *= k ** (v2 - v)
              del fb[k]
      for k, v in fb.items():
          a *= k**v
  
      print(a)
  
  
  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"}]