import numpy as np



def gcd(a,b):

  while b:

    a,b = b,a%b

  return a



N = int(eval(input()))

A = np.array([int(x) for x in input().split()],dtype=object)

gcd = np.frompyfunc(gcd,2,1)



print((gcd.reduce(A)))

from functools import reduce

from fractions import gcd



eval(input())

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

print((reduce(gcd,a)))

import numpy as np


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


N = int(eval(input()))
A = np.array([int(x) for x in input().split()], dtype=object)
gcd = np.frompyfunc(gcd, 2, 1)
print((gcd.reduce(A)))

from functools import reduce
from fractions import gcd

eval(input())
a = list(map(int, input().split()))
print((reduce(gcd, a)))

-import numpy as np +from functools import reduce +from fractions import gcd - -def gcd(a, b): -    while b: -        a, b = b, a % b -    return a - - -N = int(eval(input())) -A = np.array([int(x) for x in input().split()], dtype=object) -gcd = np.frompyfunc(gcd, 2, 1) -print((gcd.reduce(A))) +eval(input()) +a = list(map(int, input().split())) +print((reduce(gcd, a)))