n=int(input())
A=list(map(int,input().split()))
ans=A[0]
def gcd(a,b):
    if b==0: return a
    else:
        return gcd(b,a%b)
def lcm(a,b):
    return a*b//gcd(a,b)

for i in range(n-1):
    ans=gcd(ans,A[i+1])
    if ans==1:
        print(1);exit()

print(ans) 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 ans=A[0] ans A[0] A 0 def gcd(a,b):
    if b==0: return a
    else:
        return gcd(b,a%b) gcd if b==0: return a
    else:
        return gcd(b,a%b) b==0 b 0 return gcd(b,a%b) gcd(b,a%b) gcd b a%b a b a a b b def lcm(a,b):
    return a*b//gcd(a,b) lcm return a*b//gcd(a,b) a*b//gcd(a,b) a*b a b gcd(a,b) gcd a b a a b b for i in range(n-1):
    ans=gcd(ans,A[i+1])
    if ans==1:
        print(1);exit() i range(n-1) range n-1 n 1 ans=gcd(ans,A[i+1]) ans gcd(ans,A[i+1]) gcd ans A[i+1] A i+1 i 1 if ans==1:
        print(1);exit() ans==1 ans 1 print(1) print 1 exit() exit print(ans) print ans ans=gcd(ans,A[i+1]) gcd(ans,A[i+1]) ans ans=A[0] A[0] ans def gcd(a,b):
    if b==0: return a
    else:
        return gcd(b,a%b) def gcd(a,b):
    if b==0: return a
    else:
        return gcd(b,a%b) gcd n=int(input()) int(input()) n A=list(map(int,input().split())) list(map(int,input().split())) A def lcm(a,b):
    return a*b//gcd(a,b) def lcm(a,b):
    return a*b//gcd(a,b) lcm
n=int(input())
A=list(map(int,input().split()))
ans=A[0]
def gcd(a,b):
    if b==0: return a
    else:
        return gcd(b,a%b)
def lcm(a,b):
    return a*b//gcd(a,b)

for i in range(n-1):
    ans=gcd(ans,A[i+1])
    if ans==1:
        print(1);exit()

print(ans)