N = int(input())
arr = sorted(list(map(int, input().split())))
divider = arr[0]
all = False
while not all:
  all = True
  new_arr = []
  for i in range(len(arr)):
    if arr[i] % divider > 0:
      all = False
      new_arr.append(arr[i] % divider)
  new_arr.append(divider)
  arr = sorted(new_arr)
  divider = new_arr[0]

print(divider) 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 divider = arr[0] divider arr[0] arr 0 all = False all False while not all:
  all = True
  new_arr = []
  for i in range(len(arr)):
    if arr[i] % divider > 0:
      all = False
      new_arr.append(arr[i] % divider)
  new_arr.append(divider)
  arr = sorted(new_arr)
  divider = new_arr[0] not all all all = True all True new_arr = [] new_arr [] for i in range(len(arr)):
    if arr[i] % divider > 0:
      all = False
      new_arr.append(arr[i] % divider)
   i range(len(arr)) range len(arr) len arr if arr[i] % divider > 0:
      all = False
      new_arr.append(arr[i] % divider)
   arr[i] % divider > 0 arr[i] % divider arr[i] arr i divider 0 all = False all False new_arr.append(arr[i] % divider) new_arr.append new_arr append arr[i] % divider arr[i] arr i divider new_arr.append(divider) new_arr.append new_arr append divider arr = sorted(new_arr) arr sorted(new_arr) sorted new_arr divider = new_arr[0] divider new_arr[0] new_arr 0 print(divider) print divider divider = arr[0] arr[0] divider all = False False all all = True True all all = False False all new_arr = [] [] new_arr arr = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) arr N = int(input()) int(input()) N divider = new_arr[0] new_arr[0] divider arr = sorted(new_arr) sorted(new_arr) arr
N = int(input())
arr = sorted(list(map(int, input().split())))
divider = arr[0]
all = False
while not all:
  all = True
  new_arr = []
  for i in range(len(arr)):
    if arr[i] % divider > 0:
      all = False
      new_arr.append(arr[i] % divider)
  new_arr.append(divider)
  arr = sorted(new_arr)
  divider = new_arr[0]

print(divider)