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 copy
import math
from typing import List


def compute_prime_factor(n: int) -> None:
    global prime_factors
    sqrt_n = int(math.sqrt(n)) + 1
    for i in range(2, sqrt_n + 1):
        if 0 == (n % i):
            prime_factors.append(i)
            compute_prime_factor(n // i)
            return
    if 1 != n:
        prime_factors.append(n)
        return


if __name__ == "__main__":
    n = int(input())
    A = list(map(lambda x: int(x), input().split()))

    prime_factor_dict: dict = {}
    for i in range(n):
        prime_factors = []  # type: ignore
        compute_prime_factor(A[i])
        prime_factor_dict[A[i]] = prime_factors

    max_num = max(A)
    all_factors: List[int] = prime_factor_dict[max_num]
    for key, factors in prime_factor_dict.items():
        if key == max_num or key == 1:
            continue
        tmp = copy.deepcopy(prime_factor_dict[max_num])
        for elem in factors:
            if elem in tmp:
                tmp.pop(tmp.index(elem))
            else:
                all_factors.append(elem)

    ans = 1
    for elem in all_factors:
        ans *= elem
    print(ans)

