from fractions import gcd
from functools import reduce

l = [int(input()) for _ in range(int(input()))]

o = reduce(lambda x, y: int(x * y / gcd(x, y)), l)

print(o)
from fractions import gcd

from functools import reduce

l = [int(eval(input())) for _ in range(int(eval(input())))]

o = reduce(lambda x, y: int(x * y / gcd(x, y)), l)

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

l = [int(input()) for _ in range(int(input()))]
o = reduce(lambda x, y: int(x * y / gcd(x, y)), l)
print(o)

from fractions import gcd
from functools import reduce

l = [int(eval(input())) for _ in range(int(eval(input())))]
o = reduce(lambda x, y: int(x * y / gcd(x, y)), l)
print(o)

-l = [int(input()) for _ in range(int(input()))] +l = [int(eval(input())) for _ in range(int(eval(input())))]