N = int(input())
A = sorted([int(i) for i in input().split()])

def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

ans = A[0]
for i in range(1, N):
    ans = gcd(ans, A[i])

print(ans) N = int(input()) N int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = sorted([int(i) for i in input().split()]) A sorted([int(i) for i in input().split()]) sorted [int(i) for i in input().split()] def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a gcd while b > 0:
        a, b = b, a % b
     b > 0 b 0 a, b = b, a % b a b b a % b a b return a a a a b b ans = A[0] ans A[0] A 0 for i in range(1, N):
    ans = gcd(ans, A[i]) i range(1, N) range 1 N ans = gcd(ans, A[i]) ans gcd(ans, A[i]) gcd ans A[i] A i print(ans) print ans def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a gcd A = sorted([int(i) for i in input().split()]) sorted([int(i) for i in input().split()]) A ans = A[0] A[0] ans N = int(input()) int(input()) N ans = gcd(ans, A[i]) gcd(ans, A[i]) ans
N = int(input())
A = sorted([int(i) for i in input().split()])

def gcd(a, b):
    while b > 0:
        a, b = b, a % b
    return a

ans = A[0]
for i in range(1, N):
    ans = gcd(ans, A[i])

print(ans)