N = int(eval(input()))

A = list(map(int,input().split()))

def gcd(m, n):

  while n:

    m, n = n, m%n

  return m



ans = A[0]

tmp = []

for i in range(1,N):

  tmp.append(gcd(ans,A[i]))

print((min(tmp)))
def gcd(m, n):

  while n:

    m, n = n, m%n

  return m



def ans():

  N = int(eval(input()))

  A = list(map(int,input().split()))

  tmp = A[0]

  for i in range(1,N):

    tmp = gcd(A[i], tmp)

  print(tmp)

ans()
N = int(eval(input()))
A = list(map(int, input().split()))


def gcd(m, n):
    while n:
        m, n = n, m % n
    return m


ans = A[0]
tmp = []
for i in range(1, N):
    tmp.append(gcd(ans, A[i]))
print((min(tmp)))

def gcd(m, n):
    while n:
        m, n = n, m % n
    return m


def ans():
    N = int(eval(input()))
    A = list(map(int, input().split()))
    tmp = A[0]
    for i in range(1, N):
        tmp = gcd(A[i], tmp)
    print(tmp)


ans()

-N = int(eval(input())) -A = list(map(int, input().split())) - - -ans = A[0] -tmp = [] -for i in range(1, N): -    tmp.append(gcd(ans, A[i])) -print((min(tmp))) +def ans(): +    N = int(eval(input())) +    A = list(map(int, input().split())) +    tmp = A[0] +    for i in range(1, N): +        tmp = gcd(A[i], tmp) +    print(tmp) + + +ans()