def gcd(a,b):
if a%b==0:
return b
else:
return gcd(b,a%b)
def lcm(a,b):
return a*b//gcd(a,b)
def main():
while True:
n=eval(input())
if n!=0:
a,b=map(int,input().split())
print(lcm(a,b))
else:
break
main()
def gcd(a,b):
if a%b==0:
return b
else:
return gcd(b,a%b)def lcm(a,b):
return a*b//gcd(a,b)
def main():
while True:
n=eval(input())
if n!=0:
a,b=map(int,input().split())
print(lcm(a,b))
else:
break
main()
題目看清楚,n是數量,不一定是2個數的最小公倍數