from fractions import gcd



res = 0

n = int(eval(input()))

for i in range(n):

    if i == 0:

        res = int(eval(input()))

    else:

        tmp = int(eval(input()))

        res = res*tmp//gcd(res, tmp)

print(res)

from fractions import gcd



n = int(eval(input()))

t_array = [int(eval(input())) for x in range(n)]

ans = t_array[0]

for t in t_array[1:]:

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

print(ans)

from fractions import gcd

res = 0
n = int(eval(input()))
for i in range(n):
    if i == 0:
        res = int(eval(input()))
    else:
        tmp = int(eval(input()))
        res = res * tmp // gcd(res, tmp)
print(res)

from fractions import gcd

n = int(eval(input()))
t_array = [int(eval(input())) for x in range(n)]
ans = t_array[0]
for t in t_array[1:]:
    ans = ans * t // gcd(ans, t)
print(ans)

-res = 0 -for i in range(n): -    if i == 0: -        res = int(eval(input())) -    else: -        tmp = int(eval(input())) -        res = res * tmp // gcd(res, tmp) -print(res) +t_array = [int(eval(input())) for x in range(n)] +ans = t_array[0] +for t in t_array[1:]: +    ans = ans * t // gcd(ans, t) +print(ans)