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
# Aizu Problem NTL_1_C: Least Common Multiple
#
import itertools
import sys, math, os

# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
    sys.stdin = open("sample-input2.txt", "rt")


def get_factors(n):
    f = 2
    increments = itertools.chain([1,2,2], itertools.cycle([4,2,4,2,4,6,2,6]))
    for incr in increments:
        if f*f > n:
            break
        while n % f == 0:
            yield f
            n //= f
        f += incr
    if n > 1:
        yield n

N = int(input())
max_powers = {}
for n in [int(_) for _ in input().split()]:
    powers = {}
    for f in get_factors(n):
        powers[f] = powers.get(f, 0) + 1
    for p in powers:
        max_powers[p] = max(powers[p], max_powers.get(p, 0))
lcm = 1
for p in max_powers:
    lcm *= p**max_powers[p]

print(lcm)