def solve(a, b):
    mod = b%a
    if mod == 0:
        return a
    else:
        return solve(mod, a)

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

minA = min(A)
B = [a%minA for a in A]
print(solve(minA, max(B))) def solve(a, b):
    mod = b%a
    if mod == 0:
        return a
    else:
        return solve(mod, a) solve mod = b%a mod b%a b a if mod == 0:
        return a
    else:
        return solve(mod, a) mod == 0 mod 0 return a a return solve(mod, a) solve(mod, a) solve mod a a a b b 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 minA = min(A) minA min(A) min A a%minA for a in A for a in A a A for a in A a%minA a minA B = [a%minA for a in A] B [a%minA for a in A] print(solve(minA, max(B))) print solve(minA, max(B)) solve minA max(B) max B minA = min(A) min(A) minA N = int(input()) int(input()) N A = list(map(int, input().split())) list(map(int, input().split())) A B = [a%minA for a in A] [a%minA for a in A] B def solve(a, b):
    mod = b%a
    if mod == 0:
        return a
    else:
        return solve(mod, a) def solve(a, b):
    mod = b%a
    if mod == 0:
        return a
    else:
        return solve(mod, a) solve
def solve(a, b):
    mod = b%a
    if mod == 0:
        return a
    else:
        return solve(mod, a)

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

minA = min(A)
B = [a%minA for a in A]
print(solve(minA, max(B)))