We have N clocks. The hand of the i-th clock (1≤i≤N) rotates through 360° in exactly T_i seconds.

Initially, the hand of every clock stands still, pointing directly upward.

Now, Dolphin starts all the clocks simultaneously.

In how many seconds will the hand of every clock point directly upward again?

-----Constraints-----
 - 1≤N≤100 
 - 1≤T_i≤10^{18} 
 - All input values are integers.  
 - The correct answer is at most 10^{18} seconds.

-----Input-----
Input is given from Standard Input in the following format:  
N
T_1
:  
T_N

-----Output-----
Print the number of seconds after which the hand of every clock point directly upward again.

-----Sample Input-----
2
2
3

-----Sample Output-----
6

We have two clocks. The time when the hand of each clock points upward is as follows:
 - Clock 1: 2, 4, 6, ... seconds after the beginning
 - Clock 2: 3, 6, 9, ... seconds after the beginning
Therefore, it takes 6 seconds until the hands of both clocks point directly upward.

Difficulty: introductory

Starter code:

Solutions:

import math
from functools import reduce

url = "https://atcoder.jp//contests/abc070/tasks/abc070_c"

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def main():
    count = int(input())
    clocks = []
    for i in range(count):
        clocks.append(int(input()))
    print((lcm(*clocks)))

def __starting_point():
    main()

__starting_point()

import math

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

n = int(input())
t = int(input())

for i in range(n - 1):
    num = int(input())
    t = lcm(t, num)
print(t)

import math

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

ans = T[0]

for i in range(1,N):
    ans = (ans*T[i])//math.gcd(ans,T[i])
    ans %= 10**18+7
print(ans)
    


import math

n = int(input())
tl = list(int(input()) for _ in range(n))

if n == 1:
    print(tl[0])
else:
    ans = tl[0]
    for i in range(1, n):
        ans = ans//math.gcd(ans, tl[i])*tl[i]

    print(ans)

import math

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

N=int(input())
T=[int(input()) for _ in range(N)]
ans=1
for t in T:
    ans=lcm(ans,t)
print(ans)


from functools import reduce
from fractions import gcd

N = int(input())
T = list(int(input()) for _ in range(N))

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

def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

print((lcm(T)))


import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())
t = [int(input()) for _ in range(n)]

print(lcm(*t))

import math

N = int(input())
T = [0] * N
for i in range(N):
    T[i] = int(input())

if N == 1:
    print((T[0]))
elif N == 2:
    print((T[0]*T[1]//math.gcd(T[0], T[1])))
else:
    L = T[0]
    for i in range(1, N):
        L = L*T[i]//math.gcd(L, T[i])
    print(L)


import math


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


N = int(input())
ans = int(input())
for _ in range(N - 1):
    ans = lcm(ans, int(input()))
print(ans)

import math
N=int(input())
a = [int(input()) for _ in range(N)]
ans = a[0]
for i in range(1, N):
    ans = ans * a[i] // math.gcd(ans, a[i])
print(ans)

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

import math
from functools import reduce

print(reduce(lambda x,y : (x * y) // math.gcd(x, y), T,1))

from math import gcd

N = int(input())

all_t = []
gcd_all = 0

if N >= 2:
  for i in range(N):
    all_t.append(int(input()))

    if i == 1:
      gcd_all = gcd(all_t[0], all_t[1])
      base = int(all_t[0] * all_t[1] // gcd_all)
    elif i >= 2:
      gcd_all = gcd(base, all_t[i])
      base = int(base * all_t[i] // gcd_all)
  print(base)
else:
  print((int(input())))


from math import *

N=int(input())
T=list(int(input()) for _ in range(N))
ans=T[0]
for i in range(1,N):
  ans=ans*T[i]//gcd(ans,T[i])
print(ans)


import math
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
def lcm(x, y):
    return (x * y) // gcd(x, y)

N = int(input())
T = [int(input()) for _ in range(N)]
if N == 1:
    print((T[0]))
    return

ans = lcm(T[0] , T[1])
for i in range(2 , N):
    ans = lcm(T[i] , ans)
print(ans)


import numpy as np
n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))
print(np.lcm.reduce(lis))

from math import gcd
n = int(input())
t = list([int(input()) for _ in range(n)])
x = 1
for i in t:
    x = x*i//gcd(x,i)
print(x)

import math
N = int(input())
lcm = int(input()) #T0
for i in range(N-1):
    x = int(input())
    lcm = lcm * x // math.gcd(lcm,x)
print(lcm)

n = int(input())
t = [int(input()) for _ in range(n)]

import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)
print(lcm(*t))

import sys
import math
pin=sys.stdin.readline

def main():
  N=int(pin())
  ans=int(pin())
  for i in range(N-1):
    T=int(pin())
    ans=(ans*T)//math.gcd(ans,T)
  print(ans)
  return
main()

import fractions
n=int(input())
t=[]
for _ in range(n):
    T=int(input())
    t.append(T)
ans=t[0]
for i in range(1, len(t)):
    ans = ans * t[i] // fractions.gcd(ans, t[i])
print(ans)    

import math
from functools import reduce

def lcm_base(x, y):
	return (x * y) // math.gcd(x, y)

def lcm(*numbers):
	return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
	return reduce(lcm_base, numbers, 1)

n = int(input())
t = [0]*n
for i in range(n):
	t[i] = int(input())
print(lcm_list(t))

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

N=int(input())
a=int(input())
for i in range(N-1):
    a=lcm(a,int(input()))
print(a)


def lcm(m, n):
    return m//gcd(m, n)*n


def gcd(m, n):
    r = m % n
    return gcd(n, r) if r else n


n = int(input())
arr = [int(input()) for _ in range(n)]
ans = 1
for i in arr:
    ans = lcm(ans, i)

print(ans)

import math
N = int(input())
T = int(input())
for i in range(N-1):
    t = int(input())
    T = T // math.gcd(T, t) * t
print(T)

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

n=int(input())
t=[]
for i in range(n):
    t.append(int(input()))

ans=t[0]
for i in range(1,n):
    ans=lcm(ans,t[i])
print(ans)


def delete_head_zeros(n):
	n = str(n)
	l = len(n)
	if "." in n:
		l = n.find(".")
	head_zeros = 0
	for i in range(l - 1):
		if n[i] == "0":
			head_zeros += 1
		else:
			break

	return n[head_zeros:]

# compare a, b
# a, b: int or string
def bigint_compare(a, b):
	a = delete_head_zeros(a)
	b = delete_head_zeros(b)
	if len(a) > len(b):
		return 1
	elif len(a) < len(b):
		return -1
	else:
		if a > b:
			return 1
		elif a < b:
			return -1
		else:
			return 0

# calculate a + b
# a, b: int or string
def bigint_plus(a, b):
	a = str(a)
	b = str(b)

	d = max([len(a), len(b)])
	a = '0' * (d - len(a)) + a
	b = '0' * (d - len(b)) + b

	ans = ""
	carry = 0
	for i in range(d):
		s = int(a[-i-1]) + int(b[-i-1]) + carry
		carry = s // 10
		ans = str(s % 10) + ans
	else:
		if carry:
			ans = str(carry) + ans

	return ans

# calculate a - b
# a, b: int or string
def bigint_minus(a, b): 
	a = str(a)
	b = str(b)
	M = []
	m = []
	sign = ""

	if len(a) > len(b) or (len(a) == len(b) and a >= b):
		[M, m] = [a, b]
	else:
		[M, m] = [b, a]
		sign = "-"
	m = '0' * (len(M) - len(m)) + m

	ans = ""
	borrow = 0
	for i in range(len(M)):
		s = int(M[-i-1]) - int(m[-i-1]) - borrow
		if s < 0:
			borrow = 1
			s += 10
		else:
			borrow = 0
		ans = str(s) + ans

	return sign + delete_head_zeros(ans)

# calculate a * b
# a, b: int or string
def bigint_multiply(a, b):
	a = str(a)
	b = str(b)

	md = []
	for j in range(len(b)):
		carry = 0
		mj = ""
		for i in range(len(a)):
			m = int(a[-i-1]) * int(b[-j-1]) + carry
			carry = m // 10
			mj = str(m % 10) + mj
		else:
			if carry:
				mj = str(carry) + mj
		md.append(mj)

	ans = 0
	for k in range(len(md)):
		ans = bigint_plus(md[k] + "0" * k, ans)

	return ans

# calculate a / b to d digits after decimal point
# a, b, d: int or string
def bigint_divide(a, b, d = 0):
	a = str(a)
	b = str(b)
	d = int(d)
	if d < 0:
		d = 0

	ans = ""
	r = ""
	for i in range(len(a) + d):
		q = 0
		if i < len(a):
			r += a[i]
		elif i == len(a):
			ans += "."
			r += "0"
		else:
			r += "0"

		if bigint_compare(r, b) == -1:
			ans += str(q)
		else:
			while bigint_compare(r, b) >= 0:
				r = bigint_minus(r, b)
				q += 1
			ans += str(q)

	return delete_head_zeros(ans)

def gcd(a, b):
	if bigint_compare(a, b) >= 0:
		M = a
		m = b
	else:
		M = b
		m = a
	if m == "0":
		return M
	else:
		q = bigint_divide(M, m)
		r = bigint_minus(M, bigint_multiply(m, q))
		return gcd(m, r)

def lcm(a, b):
	return bigint_divide(bigint_multiply(a, b), gcd(a, b))

def main():
	N = int(input())
	T = [input() for i in range(N)]
	ans = 1
	for i in range(len(T)):
		ans = lcm(T[i], ans)

	print(ans)

main()

import numpy as np
with open(0) as f:
    N, *T = map(int, f.read().split())
ans = 1
for t in T:
    ans = np.lcm(ans, t)
print(ans)

# ==================================================-
# 最大公約数n個
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a % b)


def multiple(a, b):
    return a * b // euclid(a, b)


import functools


# ------メイン関数-------
# numsは整数のリスト
def lcm(nums):
    return functools.reduce(multiple, nums)

a=[]

n=int(input())
for i in range(n):
    a.append(int(input()))

print(lcm(a))

import math
from functools import reduce

n = int(input())
t = [int(input()) for _ in range(n)]

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

print(reduce(lcm, t))

from math import gcd
from functools import reduce


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


def main():
    n = int(input())
    t = [int(input()) for _ in range(n)]
    print((reduce(lcm, t)))


def __starting_point():
    main()

__starting_point()

# -*- coding: utf-8 -*-
"""
Created on Sat Sep 26 22:43:32 2020

@author: liang
"""

from math import gcd

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

for i in range(N):
    ans = ans*T[i]//gcd(ans,T[i])

print(ans)

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

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


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


ans = 1
for t in T:
    ans = lcm(ans, t)
print(ans)


import math
N = int(input())
ans = 1
for i in range(N):
  a = int(input())
  ans = ans*a//math.gcd(ans,a)
print(ans)

import math
import functools
def lcm(x,y):
    return (x*y)//math.gcd(x,y)
n = int(input())
t = [int(input()) for i in range(n)]
a = functools.reduce(math.gcd,t)
print(functools.reduce(lcm,t))

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

def lcm(a,b):
    return a*b//gcd(a,b)
      
N=int(input())
T=[]
total=1
for i in range(N):
    a=int(input())
    T.append(a)
T_set=sorted(list(set(T)))
M=len(T_set)

ans=T_set[0]
if M==1:
    ans=T_set[0]
else:
    for i in range(1,M):
        ans=lcm(ans,T_set[i])

print(ans)

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

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

    N = int(input())
    T = [int(input()) for _ in range(N)]
    ans = 1
    for t in T:
        ans = lcm(ans, t)
    print(ans)

def __starting_point():
    main()

__starting_point()

import math
n=int(input())
t=[int(input()) for i in range(n)]
res=t[0]
for i in range(1,n):
  res=res*t[i]//math.gcd(res,t[i])
print(res)

from math import gcd
from functools import reduce

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

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

print((reduce(lcm, TS)))


import math
n=int(input())
t=[int(input()) for i in range(n)]
res=t[0]
for i in range(1,n):
  res=res*t[i]//math.gcd(res,t[i])
print(res)

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

n=int(input())
t=[int(input()) for _ in range(n)]
ans=1
for i in t:
    ans=lcm(i,ans)
print(ans)

from math import gcd
N = int(input())
def lcm(a,b):
    return a*b//gcd(a,b)

T1 = int(input())
ans = T1
for i in range(N-1):
    T2 = int(input())
    ans = lcm(ans,T2)
    T1 = T2

print(ans)

import math
from functools import reduce


n = int(input())
tt = [int(input()) for i in range(n)]

x = 1

def lcm_base(x,y):
  return (x*y) // math.gcd(x,y)
def lcm(*numbers):
  return reduce(lcm_base, numbers, 1)

print(lcm(*tt))

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


def euc_alg(val1, val2):

    if val1 == val2:
        return val1

    mod = min(val1, val2)
    divided = max(val1, val2)
    while 1:
        tmp_mod = divided % mod

        if tmp_mod == 0:
            break
        divided = mod
        mod = tmp_mod

    ret = val1 * val2 // mod

    return ret

maxti = max(ti)
# least_common_mult = max([euc_alg(maxti, t) for t in ti])

ans = ti[0]
for t in ti:
    ans = euc_alg(ans, t)

print(ans)


import math
        
N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
ans = T[0]

for i in range(1, N):
    ans = ans * T[i] // math.gcd(ans, T[i])

print(ans)
    



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

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

N = int(input())
T = [int(input()) for _ in range(N)]
ans = 1
for t in T:
    ans = lcm(ans, t)
print(ans)


n=int(input())
import math
ans=1
for i in range(n):
    t=int(input())
    ans=(ans//math.gcd(ans,t))*t
    
print(ans)


import math

N = int(input())

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

ans = 1

for _ in range(N):
  T = int(input())
  ans = lcm(ans, T)

print(ans)

import math


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


def main():
    n = int(input())
    t_lst = [int(input()) for _ in range(n)]
    t_lst.sort()
    answer = t_lst[0]
    for i in range(1, n):
        t = t_lst[i]
        answer = lcm(answer, t)

    print(answer)


def __starting_point():
    main()
__starting_point()

N=int(input())
T=list(int(input()) for _ in range(N))

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

ans=T[0]
for i in range(1, N):
	ans=ans*T[i]//gcd(ans, T[i])
print(ans)

import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return list(map(int, input().split()))
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]


def main():
    n = i_input()
    t = i_input()
    for i in range(n-1):
        k = i_input()
        t = t*k//gcd(t,k)
    print(t)



def __starting_point():
    main()

__starting_point()

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

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

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

ans = 1

for i in range(N):
    ans = lcm(ans, T[i])

print(ans)

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(list):
    return reduce(lcm_base, list, 1)

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

print((lcm_list(T)))


from math import *

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

N=int(input())
T=[int(input()) for _ in range(N)]
ans=T[0]
for i in range(1,N):
  ans=lcm(ans,T[i])
print(ans)


from math import gcd

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

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

n = int(input())

l = []

for i in range(n):
    t = int(input())
    l.append(t)

print((lcm_list(l)))


import math
from functools import reduce
N = int(input())
T = [int(input()) for _ in range(N)]

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(T))

n = int(input())
t = [int(input()) for _ in range(n)]

import math

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

ans = 1
for i in range(n):
    ans = lcm(ans,t[i])
print(ans)

#
# abc070 c
#
import sys
from io import StringIO
import unittest
import math
from functools import reduce


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2
2
3"""
        output = """6"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """5
2
5
10
1000000000000000000
1000000000000000000"""
        output = """1000000000000000000"""
        self.assertIO(input, output)


def resolve():
    N = int(input())
    T = [int(input()) for _ in range(N)]

    print((lcmlist(T)))


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


def lcmlist(l):
    return reduce(lcm, l)


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

n = int(input())
T = [int(input()) for _ in range(n)]

def gcd(a, b):
  if a > b:
    a, b = b, a
  while a % b != 0:
    a, b = b, a % b
  return b

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

l = T.pop()
for t in T:
  l = lcm(l, t)
print(l)

from math import gcd
n = int(input())
ans = int(input())
for _ in range(n - 1):
    t = int(input())
    ans = (ans * t) // gcd(ans, t)

print(ans)


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

def gcd(a,b):
    l=max(a,b)
    s=min(a,b)
    while True:
        x=s
        y=l%s
        if y==0:
            break
        else:
            l=x
            s=y
    return s
if N!=1:
  ans=T[0]*T[1]//gcd(T[0],T[1])
  for n in range(1,N):
    ans=ans*T[n]//gcd(ans,T[n])
else:
  ans=T[0]

print(ans)            


def gcd(x, y):
    if(y == 0):
        return x
        
    return gcd(y, x%y)
    
def lcm(x, y):
    return (x*y)//(gcd(x, y))


n = int(input())
x = []
for i in range(n):
    x.append(int(input()))
        
l = x[0]
for i in range(1, n):
    l = lcm(l, x[i])
        
print(l)

from math import gcd
from functools import reduce


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


def main():
    n = int(input())
    t = {int(input()) for _ in range(n)}
    print((reduce(lcm, t)))


def __starting_point():
    main()

__starting_point()

import math

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

ans = T[0]

for i in range(1,N):
    ans = (ans*T[i])//math.gcd(ans,T[i])
    #ans %= 10**18+7
print(ans)
    


from math import gcd

n = int(input())
T = [int(input()) for _ in range(n)]

ans = 1
for i in range(n):
    ans = ans * T[i] // gcd(ans, T[i])
print(ans)

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

n = int(input())

if n == 1:
    print(input())

elif n == 2:
    a = int(input())
    b = int(input())
    print(lcm(a,b))
else:
    a = int(input())
    b = int(input())
    ans = lcm(a,b)
    for _ in range(n-2):
        i = int(input())
        ans = lcm(ans, i)
    print(ans)

N = int(input())
T = []

for i in range(N):
  T.append(int(input()))

import math

def lcm(m,n):
  return (m*n)//math.gcd(m,n)

def lcm_list(nums):
  lcm_num = nums[0]
  for i in range(1,len(nums)):
    lcm_num = lcm(lcm_num,nums[i])
  return lcm_num

print(lcm_list(T))

import math

n = int(input())
a = []  
for i in range(n):
  a.append(int(input()))
if n == 1:
  print((a[0]))
else:
  lcm = (a[0] * a[1]) // math.gcd(a[0], a[1])
  for i in range(2, n):
    lcm = (lcm * a[i]) // math.gcd(lcm, a[i])
  print(lcm)


import math

n = int(input())
ans = 1
for _ in range(n):
    t1 = int(input())
    ans = ans//math.gcd(ans, t1)*t1

print(ans)

n= int(input())
a=int(input())

import math
if n==1:
	print(a)
	return

b=int(input())
c=(a*b)//math.gcd(a,b)
for i in range(n-2):
	b=int(input())
	c=(c*b)//math.gcd(c,b)

print(c)

import math
N = int(input())
ans = 0
for i in range(N):
  if i == 0:
    ans = int(input())
  else:
    a = int(input())
    ans = (a * ans) // math.gcd(ans,a)
print(ans)


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

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

N = int(input())
T = [int(input()) for _ in range(N)]
ans = 1
for t in T:
    ans = lcm(ans, t)
print(ans)


import math
N = int(input())
lsT = []
for i in range(N):
    lsT.append(int(input()))
a = lsT[0]
for b in range(1,N):
    a = a*lsT[b] // math.gcd(a,lsT[b])
print(a)

import math

n = int(input())
tL = [int(input()) for _ in range(n)]


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


ans = tL[0]
for t in tL[1:]:
    ans = lcm(t, ans)

print(ans)

n=int(input())
A=[]
for i in range(n):
    A.append(int(input()))

import numpy as np
print(np.lcm.reduce(A))

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm(*numbers):
    return reduce(lcm_base, numbers, 1)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)
N = int(input())
AA = [int(input()) for i in range(N)]
print(lcm(*AA))

n = int(input())
a = []
for i in range(n):
  a.append(int(input()))

def gcd(x,y):
  while y != 0:
    x, y = y, x % y
  return x

res = a[0]
for i in range(n):
  res = (res*a[i]) // gcd(res,a[i])

print(res)

from math import gcd
n = int(input())
T = []
for i in range(n):
    T.append(int(input()))

tmp = T[0]
for i in range(1,n):
    g = gcd(tmp,T[i])
    tmp = T[i]*tmp//g
    
print(tmp)

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

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

res = T[0]
for t in T:
    gcd_ = gcd(res, t)
    res = res*t//gcd_
print(res)


#最大公約数
def gcd(a,b):
  if b==0:
    return a
  else:
    return gcd(b,a%b)

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

#全ての最小公倍数を求めればいい
n=int(input())
ans=1
for i in range(n):
  ans=lcm(ans,int(input()))
print(ans)

  





n = int(input())
from fractions import gcd
g = int(input())
for i in range(n-1):
  h = int(input())
  g = g * h // gcd(g,h)
print(g)

from math import gcd
n = int(input())
t = [int(input()) for i in range(n)]
ans = 1
for i in range(n):
    ans = ans*t[i]//gcd(ans, t[i])
print(ans)

import math

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

import math
from functools import reduce

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
N_List = []
for i in range(N):
    N_List.append(int(input()))

print((lcm_list(N_List)))


import math

n = int(input())
tl = [int(input()) for _ in range(n)]

if n == 1:
    print((tl[0]))
else:
    g = tl[0] // math.gcd(tl[0], tl[1]) * tl[1]
    for i in range(1, n):
        g = g // math.gcd(g, tl[i]) * tl[i]
    print(g)


import math

n = int(input())
t = [int(input()) for _ in range(n)]

ans = 1
for i in t:
    ans = ans*i // math.gcd(ans, i)
print(ans)

import math
n = int(input())
T = [int(input()) for _ in range(n)]

#最小公倍数
def lcm(x, y):
    return (x*y)//math.gcd(x, y)

ans = T[0]
for t in T[1:]:
    ans = lcm(ans, t)
print(ans)

n=int(input())

import math
from functools import reduce
def lcm_base(x, y):# 最小公倍数
    return (x * y) // math.gcd(x, y)
def lcm(numbers):
    return reduce(lcm_base, numbers, 1)

t=[]
for i in range(n):
    t.append(int(input()))

print(lcm(t))

#70
from math import gcd
n=int(input())
t=[int(input()) for i in range(n)]

ans=1
for i in range(n):
    ans*=t[i]//gcd(ans,t[i])
print(ans)


import math

a = 1
n = int(input())
for i in range(n):
  t = int(input())
  a = (a * t) // math.gcd(a, t)
print(a)

#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from math import gcd
from itertools import combinations,permutations,accumulate, product # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
import math
import bisect
import heapq
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#
# my_round_int = lambda x:np.round((x*2 + 1)//2)
# 四捨五入g
#
# インデックス系
# int min_y = max(0, i - 2), max_y = min(h - 1, i + 2);
# int min_x = max(0, j - 2), max_x = min(w - 1, j + 2);
#
#
import sys
sys.setrecursionlimit(10000000)
# mod = 10**9 + 7
#mod = 9982443453
mod = 998244353
INF = float('inf')
from sys import stdin
readline = stdin.readline
def readInts():
  return list(map(int,readline().split()))
def readTuples():
    return tuple(map(int,readline().split()))
def I():
    return int(readline())
n = I()
g = 0
lcm = 1
for i in range(n):
    A = I()
    g = math.gcd(A,g)
    if i == 0:
        lcm = A
    else:
        lcm = (lcm*A)//g
    g = lcm
print(lcm)


#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	C
# CreatedDate:  2020-09-04 15:32:03 +0900
# LastModified: 2020-09-04 15:43:28 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd


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


def main():
    n = int(input())
    ans = int(input())
    for _ in range(n-1):
        t = int(input())
        ans = ans*t//gcd(max(ans, t), min(ans, t))
    print(ans)




def __starting_point():
    main()

__starting_point()

N = int(input())
T = [int(input()) for i in range(N)]
import math
a = T[0]
for i in range(1,N):
    a = (a*T[i]) // math.gcd(a,T[i])
print(a)

# C - Multiple Clocks
import functools
import math
N = int(input())
T = [int(input()) for _ in range(N)]

def lcm(a,b):
    LCM = a*b//math.gcd(a,b)
    return LCM

def all_lcm(A):
    ans = functools.reduce(lcm,A,1)
    return ans

print(all_lcm(T))

import math
N = int(input())
T = [int(input()) for _ in range(N)]

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

ans = T[0]
for i in range(1, N):
    ans = lcm(ans, T[i])
print(ans)


def gcd(m, n):
    if m < n:
        m, n = n, m

    while True:
        r = m % n
        if r == 0:
            return n
        else:
            m, n = n, r

def lcm(m, n):
    return m*n // gcd(m, n)

n = int(input())
l = []

ans = 1

for i in range(n):
    t = int(input())
    ans = lcm(ans, t)

print(ans)


import math
from functools import reduce

def lcm_base(x,y):
    return (x*y)//math.gcd(x,y)

def lcm_list(numbers):
    return reduce(lcm_base,numbers,1)

n=int(input())
nums=[int(input()) for i in range(n)]

print((lcm_list(nums)))


def lcm(a):
    import math
    x = a[0]
    for i in range(1, len(a)):
        x = (x * a[i]) // math.gcd(x, a[i])
    return x


def resolve():
    N = int(input())
    T = [int(input()) for _ in range(N)]
    print((lcm(T)))


resolve()


from math import gcd
n = int(input())
a = 1
for _ in range(n):
  x = int(input())
  a = a // gcd(a, x) * x
print(a)

from math import gcd

n = int(input())
g = int(input())

for i in range(n-1):
    t = int(input())
    g = g * t // gcd(g, t)

print(g)