function gcd( m, n ) {
  //  m > n
  var tmp;
  while( n != 0 ) {
     if( n == 0 )  {
       return m;
     } else {
         tmp = m % n;
         m = n;
         n = tmp;
     }
  } 
}

function Main(input) {
  var N = parseInt(input[0],10);
  var a,b,c;
  var mul = 1;
  a = parseInt(input[1],10);
  mul *= a;
  c = a;
  if( N >= 2 ) {
    b = parseInt(input[2],10);
    mul *= b;
    if( a > b ) {
        c = gcd( a, b);
    } else {
        c = gcd( b, a);
    }
  }
  for( var i = 3; i < N ; i++){ 
     b = parseInt(input[i], 10);
     mul *= b;
     if( c != 1 ) {
         c = gcd( b , c );
     } 
  }
  console.log("%d", mul / c );
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));