N=int(input())
A=list(map(int,input().split()))

MIN= min(A)
while 1:
  newA = []
  MIN0 = MIN
  for i in range(len(A)):
    a = A[i] % MIN
    if a == 0:
      newA.append(a)
    else:
      if a < MIN:
        MIN = a
      newA.append(a)
  if MIN==1:break
  if MIN0 == MIN:break

print(MIN) 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 MIN= min(A) MIN min(A) min A while 1:
  newA = []
  MIN0 = MIN
  for i in range(len(A)):
    a = A[i] % MIN
    if a == 0:
      newA.append(a)
    else:
      if a < MIN:
        MIN = a
      newA.append(a)
  if MIN==1:break
  if MIN0 == MIN:break 1 newA = [] newA [] MIN0 = MIN MIN0 MIN for i in range(len(A)):
    a = A[i] % MIN
    if a == 0:
      newA.append(a)
    else:
      if a < MIN:
        MIN = a
      newA.append(a)
   i range(len(A)) range len(A) len A a = A[i] % MIN a A[i] % MIN A[i] A i MIN if a == 0:
      newA.append(a)
    else:
      if a < MIN:
        MIN = a
      newA.append(a)
   a == 0 a 0 newA.append(a) newA.append newA append a if a < MIN:
        MIN = a
       a < MIN a MIN MIN = a MIN a newA.append(a) newA.append newA append a if MIN==1:break
   MIN==1 MIN 1 if MIN0 == MIN:bre MIN0 == MIN MIN0 MIN print(MIN) print MIN a = A[i] % MIN A[i] % MIN a N=int(input()) int(input()) N MIN0 = MIN MIN MIN0 MIN= min(A) min(A) MIN MIN = a a MIN A=list(map(int,input().split())) list(map(int,input().split())) A newA = [] [] newA
N=int(input())
A=list(map(int,input().split()))

MIN= min(A)
while 1:
  newA = []
  MIN0 = MIN
  for i in range(len(A)):
    a = A[i] % MIN
    if a == 0:
      newA.append(a)
    else:
      if a < MIN:
        MIN = a
      newA.append(a)
  if MIN==1:break
  if MIN0 == MIN:break

print(MIN)