N=int(input())
hp_list = list(map(int,input().split()))

from functools import reduce
from fractions import gcd

max=0
min=10**9+1
for i in range(N):#O(10**5)
    if max < hp_list[i]:
        max = hp_list[i]
        max_index = i
    if min > hp_list[i]:
        min = hp_list[i]
        min_index = i
    tmp_list=[max,min]
    hp_list[max_index]=reduce(gcd,tmp_list)
#print(max,min)
#print(max_index,min_index)
hp_list = sorted(hp_list, reverse=False)
print(hp_list[0]) N=int(input()) N int(input()) int input() input hp_list = list(map(int,input().split())) hp_list list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split from functools import reduce from fractions import gcd max=0 max 0 min=10**9+1 min 10**9+1 10**9 10 9 1 for i in range(N):#O(10**5)
    if max < hp_list[i]:
        max = hp_list[i]
        max_index = i
    if min > hp_list[i]:
        min = hp_list[i]
        min_index = i
    tmp_list=[max,min]
    hp_list[max_index]=reduce(gcd,tmp_list)
#print(max,min)
#print(max_index,min_index) i range(N) range N if max < hp_list[i]:
        max = hp_list[i]
        max_index = i
     max < hp_list[i] max hp_list[i] hp_list i max = hp_list[i] max hp_list[i] hp_list i max_index = i max_index i if min > hp_list[i]:
        min = hp_list[i]
        min_index = i
     min > hp_list[i] min hp_list[i] hp_list i min = hp_list[i] min hp_list[i] hp_list i min_index = i min_index i tmp_list=[max,min] tmp_list [max,min] max min hp_list[max_index]=reduce(gcd,tmp_list) hp_list[max_index] hp_list max_index reduce(gcd,tmp_list) reduce gcd tmp_list hp_list = sorted(hp_list, reverse=False) hp_list sorted(hp_list, reverse=False) sorted hp_list reverse=False reverse False print(hp_list[0]) print hp_list[0] hp_list 0 max_index = i i max_index hp_list = list(map(int,input().split())) list(map(int,input().split())) hp_list min=10**9+1 10**9+1 min hp_list = sorted(hp_list, reverse=False) sorted(hp_list, reverse=False) hp_list min = hp_list[i] hp_list[i] min min_index = i i min_index N=int(input()) int(input()) N tmp_list=[max,min] [max,min] tmp_list max=0 0 max max = hp_list[i] hp_list[i] max
N=int(input())
hp_list = list(map(int,input().split()))

from functools import reduce
from fractions import gcd

max=0
min=10**9+1
for i in range(N):#O(10**5)
    if max < hp_list[i]:
        max = hp_list[i]
        max_index = i
    if min > hp_list[i]:
        min = hp_list[i]
        min_index = i
    tmp_list=[max,min]
    hp_list[max_index]=reduce(gcd,tmp_list)
#print(max,min)
#print(max_index,min_index)
hp_list = sorted(hp_list, reverse=False)
print(hp_list[0])