N = int(input())
A = list(map(int, input().split()))
A.sort()
from math import gcd
for i in range(N-1):
    a = A[i]
    b = A[i+1]
    a, b = 0, gcd(a,b)
    A[i] = a
    A[i+1] = b
print(A[N-1]) 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 A.sort() A.sort A sort from math import gcd for i in range(N-1):
    a = A[i]
    b = A[i+1]
    a, b = 0, gcd(a,b)
    A[i] = a
    A[i+1] = b i range(N-1) range N-1 N 1 a = A[i] a A[i] A i b = A[i+1] b A[i+1] A i+1 i 1 a, b = 0, gcd(a,b) a 0 b gcd(a,b) gcd a b A[i] = a A[i] A i a A[i+1] = b A[i+1] A i+1 i 1 b print(A[N-1]) print A[N-1] A N-1 N 1 b = A[i+1] A[i+1] b a = A[i] A[i] a A = list(map(int, input().split())) list(map(int, input().split())) A a, b = 0, gcd(a,b) 0 a b = 0, gcd(a,b) gcd(a,b) b N = int(input()) int(input()) N
N = int(input())
A = list(map(int, input().split()))
A.sort()
from math import gcd
for i in range(N-1):
    a = A[i]
    b = A[i+1]
    a, b = 0, gcd(a,b)
    A[i] = a
    A[i+1] = b
print(A[N-1])