import fractions

import functools

lcm=lambda x,y:x*y//fractions.gcd(x,y)

print((functools.reduce(lcm,[int(eval(input()))for _ in[0]*int(eval(input()))])))
from fractions import gcd

l=1

for _ in[0]*int(eval(input())):

    t=int(eval(input()))

    l=l*t//gcd(l,t)

print(l)
import fractions
import functools

lcm = lambda x, y: x * y // fractions.gcd(x, y)
print((functools.reduce(lcm, [int(eval(input())) for _ in [0] * int(eval(input()))])))

from fractions import gcd

l = 1
for _ in [0] * int(eval(input())):
    t = int(eval(input()))
    l = l * t // gcd(l, t)
print(l)

-import fractions -import functools +from fractions import gcd -lcm = lambda x, y: x * y // fractions.gcd(x, y) -print((functools.reduce(lcm, [int(eval(input())) for _ in [0] * int(eval(input()))]))) +l = 1 +for _ in [0] * int(eval(input())): +    t = int(eval(input())) +    l = l * t // gcd(l, t) +print(l)