10336: 最大公约数

Memory Limit:256 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:0

Description

今天是国庆节,小Z为了给祖国庆祝生日拿来了n个数字a[1],a[2]…a[n]

max{gcd(ai,aj)} ( i!=j ) 。

Input

输入文件gcd.in

第一行一个整数n

之后一行n个数,表示a[1],a[2]…a[n]

Output

输出文件gcd.out

输出一个整数表示答案。

Sample Input Copy

3
4 3 6

Sample Output Copy

3
【数据规模和约定】
对于30%的数据,满足n<=1000;
对于100%的数据,满足n<=10000,1<=a[i]<=10^6;