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
public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int n;
    int[] a, p, max;
    int i, j, res, pn;

    n = sc.nextInt();
    pn = 1000;
    a = new int[n];
    p = new int[pn];
    max = new int[pn];
    for(i = 0;i < n;i++)a[i] = sc.nextInt();

    for(i = 0;i < n;i++){
      for(j = 0;j < pn;j++)p[j] = 0;
      for(;a[i] != 1;){
        for(j = 2;j * j <= a[i];j++){
          if(a[i] % j == 0){
            p[j]++;
            a[i] = a[i] / j;
            break;
          }
        }
        if(j * j > a[i]){
          p[a[i]]++;
          break;
        }
      }
      for(j = 2;j < pn;j++)if(max[j] < p[j])max[j] = p[j];
    }
    res = 1;
    for(i = 2;i < pn;i++)if(isprime(i))for(j = 0;j < max[i];j++)res *= i;
    System.out.println(res);

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static boolean isprime(int p){
    int i;
    if(p == 1)return false;
    for(i = 2;i * i <= p;i++){
      if(p % i == 0)return false;
    }
    return true;
  }
}