from fractions import gcd

from functools import reduce

def lcm(x, y): return x * y // gcd(x, y)

N, *T = list(map(int, open(0).read().split()))

print((reduce(lcm, T)))
def gcd(a, b):

    while b:

        a, b = b, a % b

    return a



ans = 1

for _ in range(int(eval(input()))):

    t = int(eval(input()))

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

print(ans)
from fractions import gcd
from functools import reduce


def lcm(x, y):
    return x * y // gcd(x, y)


N, *T = list(map(int, open(0).read().split()))
print((reduce(lcm, T)))

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


ans = 1
for _ in range(int(eval(input()))):
    t = int(eval(input()))
    ans = ans * t // gcd(ans, t)
print(ans)

-from fractions import gcd -from functools import reduce +def gcd(a, b): +    while b: +        a, b = b, a % b +    return a -def lcm(x, y): -    return x * y // gcd(x, y) - - -N, *T = list(map(int, open(0).read().split())) -print((reduce(lcm, T))) +ans = 1 +for _ in range(int(eval(input()))): +    t = int(eval(input())) +    ans = ans * t // gcd(ans, t) +print(ans)