def gcd(a, b):

    if b == 1:

        return 1

    # a > b　を仮定

    r = a % b

    if r == 0:

        return b

    else:

        return gcd(b, r)



#def lcm(A, n):

#    if n == 2:

#        return A[0]*A[1] // gcd(A[0], A[1])

#    #lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める

#    a = lcm(A, n-1)

#    return a* A[n-1] // gcd(a, A[n-1])



n = int(eval(input()))

#a = []

T1 = int(eval(input()))

for i in range(n-1):

    T2 = int(eval(input()))

    T1 = T1*T2 // gcd(T1, T2)

    #a.append(int(input()))

#a.sort(reverse = True)

#ans = lcm(a, n)

print((str(T1)))
import sys

sys.setrecursionlimit(10000)



def gcd(a, b):

    if b == 1:

        return 1

    r = a % b

    if r == 0:

        return b

    else:

        return gcd(b, r)



def lcm(A, n):

    if n == 2:

        return A[0]* (A[1] // gcd(A[0], A[1]))

    #lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める

    rec = lcm(A, n-1)

    return rec * (A[n-1] // gcd(rec, A[n-1]))



n = int(eval(input()))

a = []

for i in range(n):

    a.append(int(eval(input())))

if n >= 2:

    ans = lcm(a, n)

else:

    ans = a[0]

print((str(ans)))
def gcd(a, b):
    if b == 1:
        return 1
    # a > b　を仮定
    r = a % b
    if r == 0:
        return b
    else:
        return gcd(b, r)


# def lcm(A, n):
#    if n == 2:
#        return A[0]*A[1] // gcd(A[0], A[1])
#    #lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める
#    a = lcm(A, n-1)
#    return a* A[n-1] // gcd(a, A[n-1])
n = int(eval(input()))
# a = []
T1 = int(eval(input()))
for i in range(n - 1):
    T2 = int(eval(input()))
    T1 = T1 * T2 // gcd(T1, T2)
    # a.append(int(input()))
# a.sort(reverse = True)
# ans = lcm(a, n)
print((str(T1)))

import sys

sys.setrecursionlimit(10000)


def gcd(a, b):
    if b == 1:
        return 1
    r = a % b
    if r == 0:
        return b
    else:
        return gcd(b, r)


def lcm(A, n):
    if n == 2:
        return A[0] * (A[1] // gcd(A[0], A[1]))
    # lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める
    rec = lcm(A, n - 1)
    return rec * (A[n - 1] // gcd(rec, A[n - 1]))


n = int(eval(input()))
a = []
for i in range(n):
    a.append(int(eval(input())))
if n >= 2:
    ans = lcm(a, n)
else:
    ans = a[0]
print((str(ans)))

+import sys + +sys.setrecursionlimit(10000) + + -    # a > b　を仮定 -# def lcm(A, n): -#    if n == 2: -#        return A[0]*A[1] // gcd(A[0], A[1]) -#    #lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める -#    a = lcm(A, n-1) -#    return a* A[n-1] // gcd(a, A[n-1]) +def lcm(A, n): +    if n == 2: +        return A[0] * (A[1] // gcd(A[0], A[1])) +    # lcm(A, n)はA[0]-A[n-1]までの最小公倍数を求める +    rec = lcm(A, n - 1) +    return rec * (A[n - 1] // gcd(rec, A[n - 1])) + + -# a = [] -T1 = int(eval(input())) -for i in range(n - 1): -    T2 = int(eval(input())) -    T1 = T1 * T2 // gcd(T1, T2) -    # a.append(int(input())) -# a.sort(reverse = True) -# ans = lcm(a, n) -print((str(T1))) +a = [] +for i in range(n): +    a.append(int(eval(input()))) +if n >= 2: +    ans = lcm(a, n) +else: +    ans = a[0] +print((str(ans)))