N = int(input())
a = sorted(list(map(int,input().split())))
import fractions
from functools import reduce
def cal_gcd(numbers):
  return reduce(fractions.gcd, numbers)
print(cal_gcd(a)) N = int(input()) N int(input()) int input() input a = sorted(list(map(int,input().split()))) a sorted(list(map(int,input().split()))) sorted list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split import fractions fractions from functools import reduce def cal_gcd(numbers):
  return reduce(fractions.gcd, numbers) cal_gcd return reduce(fractions.gcd, numbers) reduce(fractions.gcd, numbers) reduce fractions.gcd fractions gcd numbers numbers numbers print(cal_gcd(a)) print cal_gcd(a) cal_gcd a def cal_gcd(numbers):
  return reduce(fractions.gcd, numbers) def cal_gcd(numbers):
  return reduce(fractions.gcd, numbers) cal_gcd a = sorted(list(map(int,input().split()))) sorted(list(map(int,input().split()))) a N = int(input()) int(input()) N
N = int(input())
a = sorted(list(map(int,input().split())))
import fractions
from functools import reduce
def cal_gcd(numbers):
  return reduce(fractions.gcd, numbers)
print(cal_gcd(a))
