import fractions
N=int(input())
a=input().split()
A=[int(b) for b in a]
A=sorted(A,reverse=True)
numbers=[]
numbers.append(fractions.gcd(A[0],A[1]))
for a in range(1,N):
    answer=fractions.gcd(numbers[-1],A[a])
    numbers.append(answer)
print(numbers[-1]) import fractions fractions N=int(input()) N int(input()) int input() input a=input().split() a input().split() ().split () input split int(b) for b in a for b in a b a for b in a int(b) int b A=[int(b) for b in a] A [int(b) for b in a] A=sorted(A,reverse=True) A sorted(A,reverse=True) sorted A reverse=True reverse True numbers=[] numbers [] numbers.append(fractions.gcd(A[0],A[1])) numbers.append numbers append fractions.gcd(A[0],A[1]) fractions.gcd fractions gcd A[0] A 0 A[1] A 1 for a in range(1,N):
    answer=fractions.gcd(numbers[-1],A[a])
    numbers.append(answer) a range(1,N) range 1 N answer=fractions.gcd(numbers[-1],A[a]) answer fractions.gcd(numbers[-1],A[a]) fractions.gcd fractions gcd numbers[-1] numbers -1 A[a] A a numbers.append(answer) numbers.append numbers append answer print(numbers[-1]) print numbers[-1] numbers -1 numbers=[] [] numbers A=sorted(A,reverse=True) sorted(A,reverse=True) A answer=fractions.gcd(numbers[-1],A[a]) fractions.gcd(numbers[-1],A[a]) answer N=int(input()) int(input()) N a=input().split() input().split() a A=[int(b) for b in a] [int(b) for b in a] A
import fractions
N=int(input())
a=input().split()
A=[int(b) for b in a]
A=sorted(A,reverse=True)
numbers=[]
numbers.append(fractions.gcd(A[0],A[1]))
for a in range(1,N):
    answer=fractions.gcd(numbers[-1],A[a])
    numbers.append(answer)
print(numbers[-1])
