
N = int(input())
A = list(map(int,input().split()))
import math

f = A[0]
for i in range(1,N):
    a,b=f, A[i]
    f=math.gcd(a,b)

print(f) N = int(input()) N int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split import math math f = A[0] f A[0] A 0 for i in range(1,N):
    a,b=f, A[i]
    f=math.gcd(a,b) i range(1,N) range 1 N a,b=f, A[i] a f b A[i] A i f=math.gcd(a,b) f math.gcd(a,b) math.gcd math gcd a b print(f) print f N = int(input()) int(input()) N A = list(map(int,input().split())) list(map(int,input().split())) A f = A[0] A[0] f f=math.gcd(a,b) math.gcd(a,b) f b=f, A[i] A[i] b a,b=f, A[i] f a

N = int(input())
A = list(map(int,input().split()))
import math

f = A[0]
for i in range(1,N):
    a,b=f, A[i]
    f=math.gcd(a,b)

print(f)
