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
def get_primes(n):
  lst = []
  for x in xrange(2, n+1):
    is_prime = True
    for i in xrange(len(lst)):
      if x % lst[i] == 0:
        is_prime = False
        break
    if is_prime:
      lst.append(x)
  return lst

primes = get_primes(1000)
n = int(raw_input())
a = map(int, raw_input().split())
mul_list = {}
for i in xrange(n):
  ai = a[i]
  for j in xrange(len(primes)):
    counter = 0
    while True:
      if ai % primes[j] == 0:
        ai = ai / primes[j]
        counter += 1
      else:
        break
    if counter > 0:
      if primes[j] in mul_list:
        mul_list[primes[j]] = max(mul_list[primes[j]], counter)
      else:
        mul_list[primes[j]] = counter

ans = 1
for k,v in mul_list.items():
  ans *= k ** v
print ans