import java.util.Scanner; class Main{ public static int gcd(int x,int y){ int r; while(y>0){ r=x%y; x=y; y=r; } return x; } public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(),a[]=new int[n]; for(int i=0;i