N = int(input())
arr = sorted(list(map(int, input().split())))

import math
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

ans_list = sorted(make_divisors(arr[0]),reverse=True)

for i in ans_list:
    flg =True
    for j in arr:
        if j%i != 0:
            flg =False
            break
    if flg:
        print(i)
        exit() N = int(input()) N int(input()) int input() input arr = sorted(list(map(int, input().split()))) arr 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 math math def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors make_divisors divisors = [] divisors [] for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
     i range(1, int(n**0.5)+1) range 1 int(n**0.5)+1 int(n**0.5) int n**0.5 n 0.5 1 if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
     n % i == 0 n % i n i 0 divisors.append(i) divisors.append divisors append i if i != n // i:
                divisors.append(n//i)
     i != n // i i n // i n i divisors.append(n//i) divisors.append divisors append n//i n i return divisors divisors n n ans_list = sorted(make_divisors(arr[0]),reverse=True) ans_list sorted(make_divisors(arr[0]),reverse=True) sorted make_divisors(arr[0]) make_divisors arr[0] arr 0 reverse=True reverse True for i in ans_list:
    flg =True
    for j in arr:
        if j%i != 0:
            flg =False
            break
    if flg:
        print(i)
        exit() i ans_list flg =True flg True for j in arr:
        if j%i != 0:
            flg =False
            break
     j arr if j%i != 0:
            flg =False
            break
     j%i != 0 j%i j i 0 flg =False flg False break if flg:
        print(i)
        exit() flg print(i) print i exit() exit arr = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) arr ans_list = sorted(make_divisors(arr[0]),reverse=True) sorted(make_divisors(arr[0]),reverse=True) ans_list flg =False False flg N = int(input()) int(input()) N def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors make_divisors flg =True True flg
N = int(input())
arr = sorted(list(map(int, input().split())))

import math
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return divisors

ans_list = sorted(make_divisors(arr[0]),reverse=True)

for i in ans_list:
    flg =True
    for j in arr:
        if j%i != 0:
            flg =False
            break
    if flg:
        print(i)
        exit()