n = int(input())

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

import math

temp = al[0]

for i in range(1,n):
    temp = math.gcd(temp,al[i])
    
print(temp) n = int(input()) n int(input()) int input() input al = list(map(int, input().split())) al list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split import math math temp = al[0] temp al[0] al 0 for i in range(1,n):
    temp = math.gcd(temp,al[i])
     i range(1,n) range 1 n temp = math.gcd(temp,al[i]) temp math.gcd(temp,al[i]) math.gcd math gcd temp al[i] al i print(temp) print temp n = int(input()) int(input()) n temp = al[0] al[0] temp al = list(map(int, input().split())) list(map(int, input().split())) al temp = math.gcd(temp,al[i]) math.gcd(temp,al[i]) temp
n = int(input())

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

import math

temp = al[0]

for i in range(1,n):
    temp = math.gcd(temp,al[i])
    
print(temp)