from functools import reduce
a, b = map (int, input().split())
c = [1] #初始化
for i in range(2, min(a,b)+1):#不能从1开始否则下面的循环条件永远成立
    while a%i==0 and b%i==0:
        c.append(i)
        a = a/i
        b = b/i
m = reduce(lambda x,y:x*y, c) #最大公约数
res = int(a*b*m) #这里的a,b已经是更新过的位于短除法底部的值
print(res)