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 sys
import math

z=input()
n=list(map(int,input().split()))
k={}
L={}

for num in n:
  #yakusu no kazu wo kaesu
  i=num
  j=2
  k.clear()
  while i>1:
    if i%j==0:
      if j in k:
        k[j]+=1
      else:
        k[j]=1
      i/=j
      j=2
    else:
      j+=1
      
  for i in k:
    if i in L:
      if k[i]>L[i]:
        L[i]=k[i]
    else:
      L[i]=k[i]

#print(L)
ans=1
for i in L:
  ans*=i**L[i]

print(ans)

