import fractions

N = int(eval(input()))

T = [int(eval(input())) for i in range(N)]



lcm = 1

for t in T:

    lcm = lcm * t // fractions.gcd(lcm,t)

print(lcm)
from fractions import gcd

N = int(eval(input()))

T = [int(eval(input())) for i in range(N)]

lcm = T[0]

for t in T[1:]:

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

print(lcm)
import fractions

N = int(eval(input()))
T = [int(eval(input())) for i in range(N)]
lcm = 1
for t in T:
    lcm = lcm * t // fractions.gcd(lcm, t)
print(lcm)

from fractions import gcd

N = int(eval(input()))
T = [int(eval(input())) for i in range(N)]
lcm = T[0]
for t in T[1:]:
    lcm *= t // gcd(lcm, t)
print(lcm)

-import fractions +from fractions import gcd -lcm = 1 -for t in T: -    lcm = lcm * t // fractions.gcd(lcm, t) +lcm = T[0] +for t in T[1:]: +    lcm *= t // gcd(lcm, t)