N = int(input())
A_list = list(map(int, input().split()))

def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2)

tmp = A_list[0]
for a in A_list:
    tmp = gcd(tmp, a)

print(tmp) N = int(input()) N int(input()) int input() input A_list = list(map(int, input().split())) A_list list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2) gcd if v2 == 0:
        return v1
     v2 == 0 v2 0 return v1 v1 return gcd(v2, v1%v2) gcd(v2, v1%v2) gcd v2 v1%v2 v1 v2 v1 v1 v2 v2 tmp = A_list[0] tmp A_list[0] A_list 0 for a in A_list:
    tmp = gcd(tmp, a) a A_list tmp = gcd(tmp, a) tmp gcd(tmp, a) gcd tmp a print(tmp) print tmp def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2) def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2) gcd tmp = gcd(tmp, a) gcd(tmp, a) tmp N = int(input()) int(input()) N A_list = list(map(int, input().split())) list(map(int, input().split())) A_list tmp = A_list[0] A_list[0] tmp
N = int(input())
A_list = list(map(int, input().split()))

def gcd(v1, v2):
    if v2 == 0:
        return v1
    return gcd(v2, v1%v2)

tmp = A_list[0]
for a in A_list:
    tmp = gcd(tmp, a)

print(tmp)