N = int(eval(input()))

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



def gcd(a, b):

    while b:

        a, b = b, a % b

    return a



def lcm(a, b):

    return a * b // gcd(a, b)



x = L[0]

for i in range(len(L)-1):

    y = lcm(x, L[i+1])

    x = y

    

print(x)
#a,bの最大公約数

def gcd(a, b):

    while b:

        a, b = b, a % b

    return a



#a,bの最小公倍数

def lcm(a, b):

    return a * b // gcd (a, b)



N = int(eval(input()))

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



tmp = L[0]

for i in range(1, N):

    tmp = lcm(tmp, L[i])

    

print(tmp)

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


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


def lcm(a, b):
    return a * b // gcd(a, b)


x = L[0]
for i in range(len(L) - 1):
    y = lcm(x, L[i + 1])
    x = y
print(x)

# a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


# a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)


N = int(eval(input()))
L = [int(eval(input())) for _ in range(N)]
tmp = L[0]
for i in range(1, N):
    tmp = lcm(tmp, L[i])
print(tmp)

-N = int(eval(input())) -L = [int(eval(input())) for i in range(N)] - - +# a,bの最大公約数 +# a,bの最小公倍数 -x = L[0] -for i in range(len(L) - 1): -    y = lcm(x, L[i + 1]) -    x = y -print(x) +N = int(eval(input())) +L = [int(eval(input())) for _ in range(N)] +tmp = L[0] +for i in range(1, N): +    tmp = lcm(tmp, L[i]) +print(tmp)