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.

a, b = map(int, input().split())

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

print(large_num/div_result*small_num)
a, b = map(int, input().split())

large_num = 0
small_num = 0
if a > b:
  large_num = a
  small_num = b
else:
  large_num = b
  small_num = a

div_result = 0

for n in range(large_num):
  result1 = large_num%(n+1)
  result2 = small_num%(n+1)
  if result1==0 and result2 ==0:
    div_result = n+1

result = int(large_num/div_result*small_num)
print(result)