N = int(input())
a = list(map(int, input().split()))
a.sort()

def gcd(a, b):
    if b != 0:
        return gcd(b, a%b)
    else:
        return a
ans = 10**10
for i in range(N-1):
    ans = min(ans, gcd(a[i], 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 a.sort() a.sort a sort def gcd(a, b):
    if b != 0:
        return gcd(b, a%b)
    else:
        return a gcd if b != 0:
        return gcd(b, a%b)
    else:
        return a b != 0 b 0 return gcd(b, a%b) gcd(b, a%b) gcd b a%b a b return a a a a b b ans = 10**10 ans 10**10 10 10 for i in range(N-1):
    ans = min(ans, gcd(a[i], a[i+1])) i range(N-1) range N-1 N 1 ans = min(ans, gcd(a[i], a[i+1])) ans min(ans, gcd(a[i], a[i+1])) min ans gcd(a[i], a[i+1]) gcd a[i] a i a[i+1] a i+1 i 1 print(ans) print ans a = list(map(int, input().split())) list(map(int, input().split())) a N = int(input()) int(input()) N def gcd(a, b):
    if b != 0:
        return gcd(b, a%b)
    else:
        return a def gcd(a, b):
    if b != 0:
        return gcd(b, a%b)
    else:
        return a gcd ans = 10**10 10**10 ans ans = min(ans, gcd(a[i], a[i+1])) min(ans, gcd(a[i], a[i+1])) ans
N = int(input())
a = list(map(int, input().split()))
a.sort()

def gcd(a, b):
    if b != 0:
        return gcd(b, a%b)
    else:
        return a
ans = 10**10
for i in range(N-1):
    ans = min(ans, gcd(a[i], a[i+1]))
print(ans)
