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: EASY

Solutions:
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)


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())
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))


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)


(_, a, *l) = map(int, open(0).read().split())
for i in l:
	(x, y) = (a, i)
	while y:
		(x, y) = (y, x % y)
	a *= i // x
print(a)


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

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())
g = int(input())
for _ in range(N - 1):
	T = int(input())
	g = g * T // math.gcd(g, T)
print(g)


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 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

def lcm(nums):
	return functools.reduce(multiple, nums)
a = []
n = int(input())
for i in range(n):
	a.append(int(input()))
print(lcm(a))


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


from math import gcd
from functools import reduce
f = lambda x, y: x * y // gcd(x, y)
print(reduce(f, [int(input()) for _ in range(int(input()))]))


def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)
ans = 1
for i in range(int(input())):
	h = int(input())
	ans = ans * h // gcd(ans, h)
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())
l = 1
for _ in range(n):
	t = int(input())
	l = l // gcd(l, t) * t
print(l)


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)


from math import gcd
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
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
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)


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)


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
n = int(input())
ans = int(input())
for _ in range(n - 1):
	x = int(input())
	ans = ans * x // gcd(ans, x)
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))


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)


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))


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))


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)


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())
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))


(_, a, *l) = map(int, open(0))
from fractions import *
for i in l:
	a *= i // gcd(a, i)
print(a)


import math
N = int(input())
P = [int(input()) for _ in range(N)]
a = 1
for p in P:
	g = math.gcd(a, p)
	a = a * p // g
print(a)


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)


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


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)


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)


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))


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()


import math
(N, A, *T) = map(int, open(0))
for t in T:
	A *= t // math.gcd(A, t)
print(A)


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)


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 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()


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())
lcm = int(input())
for i in range(N - 1):
	x = int(input())
	lcm = lcm * x // math.gcd(lcm, x)
print(lcm)


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


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


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)


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


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


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


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())
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)


from fractions import *
(_, *t) = map(int, open(0))
l = 1
for a in t:
	l = l * a // gcd(l, a)
print(l)


from math import gcd
n = int(input())
lc = int(input())
for i in range(n - 1):
	t = int(input())
	gc = gcd(lc, t)
	lc = t * lc // gc
print(lc)


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()


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)


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()))


l = 1
for _ in [0] * int(input()):
	t = int(input())
	(a, b) = (l, t)
	while b:
		(a, b) = (b, a % b)
	l *= t // a
print(l)


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)


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 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\n2\n3'
		output = '6'
		self.assertIO(input, output)

	def test_入力例_2(self):
		input = '5\n2\n5\n10\n1000000000000000000\n1000000000000000000'
		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():
	resolve()
__starting_point()


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


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)


from functools import *
from fractions import *
(n, *t) = map(int, open(0).read().split())

def ggcd(a, b):
	return a * b // gcd(a, b)
print(reduce(ggcd, t))


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)


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)


import math

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)
n = int(input())
t = int(input())
for i in range(n - 1):
	t = lcm(t, int(input()))
print(t)


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
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)


def gcd(x, y):
	if y == 0:
		return x
	return gcd(y, x % y)
a = 1
for i in range(int(input())):
	h = int(input())
	a = a * h // gcd(a, h)
print(a)


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


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)


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
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))


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())
t = list([int(input()) for _ in range(n)])
x = 1
for i in t:
	x = x * i // gcd(x, i)
print(x)