n = int(input())
A = tuple(map(int, input().split()))
ma = min(A)
while True:
    ra = set([a%ma for a in A if a%ma > 0])
    if len(ra) == 0:
        print(ma)
        break
    minra = min(ra)
    if ma == minra:
        print(ma)
        break
    ma = minra n = int(input()) n int(input()) int input() input A = tuple(map(int, input().split())) A tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split ma = min(A) ma min(A) min A while True:
    ra = set([a%ma for a in A if a%ma > 0])
    if len(ra) == 0:
        print(ma)
        break
    minra = min(ra)
    if ma == minra:
        print(ma)
        break
    ma = minra True a%ma for a in A if a%ma > 0 for a in A if a%ma > 0 a A a%ma > 0 a%ma a ma 0 if a%ma > 0 a%ma a ma ra = set([a%ma for a in A if a%ma > 0]) ra set([a%ma for a in A if a%ma > 0]) set [a%ma for a in A if a%ma > 0] if len(ra) == 0:
        print(ma)
        break
     len(ra) == 0 len(ra) len ra 0 print(ma) print ma break minra = min(ra) minra min(ra) min ra if ma == minra:
        print(ma)
        break
     ma == minra ma minra print(ma) print ma break ma = minra ma minra n = int(input()) int(input()) n ra = set([a%ma for a in A if a%ma > 0]) set([a%ma for a in A if a%ma > 0]) ra ma = minra minra ma A = tuple(map(int, input().split())) tuple(map(int, input().split())) A ma = min(A) min(A) ma minra = min(ra) min(ra) minra
n = int(input())
A = tuple(map(int, input().split()))
ma = min(A)
while True:
    ra = set([a%ma for a in A if a%ma > 0])
    if len(ra) == 0:
        print(ma)
        break
    minra = min(ra)
    if ma == minra:
        print(ma)
        break
    ma = minra
