import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
int[] a =new int[n];
a[0] = sc.nextInt();
int max = a[0];
for(int i=1;i<n;i++ ){
a[i]=sc.nextInt();
if(max<a[i]){
max=a[i];
}
}
int res=max,i=0;
while(i<n){
if(res%a[i]!=0){
res=res+max;
i=0;
}else{
i++;
}
}
System.out.println(res);
}
}
}
import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
while(n-->0){
String str = sc.next();
boolean boo = true;
for(int i=0;i<str.length()/2;i++){
if(str.charAt(i)!=str.charAt(str.length()-i-1)){
System.out.println("no");
boo = false;
break;
}
}
if(boo){
System.out.println("yes");
}
}
}
}