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

def gcd(p, q):
    if q == 0:
        return p
    else:
        return gcd(q, p % q)

g = gcd(a[0], a[1])
for i in range(2, n):
    g = gcd(g, a[i])

print(g) 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 def gcd(p, q):
    if q == 0:
        return p
    else:
        return gcd(q, p % q) gcd if q == 0:
        return p
    else:
        return gcd(q, p % q) q == 0 q 0 return p p return gcd(q, p % q) gcd(q, p % q) gcd q p % q p q p p q q g = gcd(a[0], a[1]) g gcd(a[0], a[1]) gcd a[0] a 0 a[1] a 1 for i in range(2, n):
    g = gcd(g, a[i]) i range(2, n) range 2 n g = gcd(g, a[i]) g gcd(g, a[i]) gcd g a[i] a i print(g) print g g = gcd(g, a[i]) gcd(g, a[i]) g a = list(map(int, input().split())) list(map(int, input().split())) a g = gcd(a[0], a[1]) gcd(a[0], a[1]) g n = int(input()) int(input()) n def gcd(p, q):
    if q == 0:
        return p
    else:
        return gcd(q, p % q) def gcd(p, q):
    if q == 0:
        return p
    else:
        return gcd(q, p % q) gcd
n = int(input())
a = list(map(int, input().split()))

def gcd(p, q):
    if q == 0:
        return p
    else:
        return gcd(q, p % q)

g = gcd(a[0], a[1])
for i in range(2, n):
    g = gcd(g, a[i])

print(g)