import math

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

N = int(input())
A = list(map(int, input().split()))
g = [math.gcd(A[0], A[1])]
for i in range(2, N):
    g.append(math.gcd(g[-1], A[i]))
print(g[-1])
