n = int(input())
a= list(map(int,input().split()))

from fractions import gcd

ans =0
for i in range(n-1):
    if i==0:
        ans = gcd(a[i],a[i+1])
    else:
        ans = gcd(ans,a[i+1])

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 from fractions import gcd ans =0 ans 0 for i in range(n-1):
    if i==0:
        ans = gcd(a[i],a[i+1])
    else:
        ans = gcd(ans,a[i+1]) i range(n-1) range n-1 n 1 if i==0:
        ans = gcd(a[i],a[i+1])
    else:
        ans = gcd(ans,a[i+1]) i==0 i 0 ans = gcd(a[i],a[i+1]) ans gcd(a[i],a[i+1]) gcd a[i] a i a[i+1] a i+1 i 1 ans = gcd(ans,a[i+1]) ans gcd(ans,a[i+1]) gcd ans a[i+1] a i+1 i 1 print(ans) print ans ans =0 0 ans ans = gcd(ans,a[i+1]) gcd(ans,a[i+1]) ans a= list(map(int,input().split())) list(map(int,input().split())) a n = int(input()) int(input()) n ans = gcd(a[i],a[i+1]) gcd(a[i],a[i+1]) ans
n = int(input())
a= list(map(int,input().split()))

from fractions import gcd

ans =0
for i in range(n-1):
    if i==0:
        ans = gcd(a[i],a[i+1])
    else:
        ans = gcd(ans,a[i+1])

print(ans)