Find the least common multiple (LCM) of given n integers.

Constraints

* 2 ≤ n ≤ 10
* 1 ≤ ai ≤ 1000
* Product of given integers ai(i = 1, 2, ... n) does not exceed 231-1

Input


n
a1 a2 ... an


n is given in the first line. Then, n integers are given in the second line.

Output

Print the least common multiple of the given integers in a line.

Examples

Input

3
3 4 6


Output

12


Input

4
1 2 3 5


Output

30
import math

k = input()
a = map(int, raw_input().split())

prime = []
#find prime numbers in 1-sqrt(n)
m = int(math.sqrt(1000))
for i in range(m+1):
    prime.append(True)

prime[0] = False
prime[1] = False

for i in range(2, int(math.sqrt(m))):
    if not prime[i]:
        continue
    else:
        for j in range(i+1, int(math.sqrt(m))):
            if j % i == 0:
                prime[j] = False

lcm = {}

for n in a:
    s = []
    i = 2
    num = n
    while True:
        if i == int(math.sqrt(num))+1:
            s.append(str(n))
            break
        if not prime[i] or n % i != 0:
            i += 1
            continue

        if n % i == 0:
            s.append(str(i))
            n /= i
            if n == 1:
                break
    tmp_dict = {}


    for c in s:
        if not c in tmp_dict.keys():
            tmp_dict[c] = 1
        else:
            tmp_dict[c] += 1
    for key in tmp_dict.iterkeys():
        if not key in lcm.keys():
            lcm[key] = tmp_dict[key]
        elif lcm[key] < tmp_dict[key]:
            lcm[key] = tmp_dict[key]

L = 1
for key in lcm.iterkeys():
    if lcm[key] != 0:
            L *= int(key) ** lcm[key]

print "%d" % L