import fractions

N = int(input())
A = list(input().split())
monster = list(sorted([int(A[i]) for i in range(N)]))
ans = float('inf')
MIN = monster[0]

for i in range(N):
    tmp = monster[i]
    ans = min(ans, int(fractions.gcd(tmp, MIN)))

print(ans) import fractions fractions N = int(input()) N int(input()) int input() input A = list(input().split()) A list(input().split()) list input().split() ().split () input split int(A[i]) for i in range(N) for i in range(N) i range(N) range N for i in range(N) int(A[i]) int A[i] A i monster = list(sorted([int(A[i]) for i in range(N)])) monster list(sorted([int(A[i]) for i in range(N)])) list sorted([int(A[i]) for i in range(N)]) sorted [int(A[i]) for i in range(N)] ans = float('inf') ans float('inf') float 'inf' MIN = monster[0] MIN monster[0] monster 0 for i in range(N):
    tmp = monster[i]
    ans = min(ans, int(fractions.gcd(tmp, MIN))) i range(N) range N tmp = monster[i] tmp monster[i] monster i ans = min(ans, int(fractions.gcd(tmp, MIN))) ans min(ans, int(fractions.gcd(tmp, MIN))) min ans int(fractions.gcd(tmp, MIN)) int fractions.gcd(tmp, MIN) fractions.gcd fractions gcd tmp MIN print(ans) print ans N = int(input()) int(input()) N MIN = monster[0] monster[0] MIN A = list(input().split()) list(input().split()) A ans = min(ans, int(fractions.gcd(tmp, MIN))) min(ans, int(fractions.gcd(tmp, MIN))) ans ans = float('inf') float('inf') ans tmp = monster[i] monster[i] tmp monster = list(sorted([int(A[i]) for i in range(N)])) list(sorted([int(A[i]) for i in range(N)])) monster
import fractions

N = int(input())
A = list(input().split())
monster = list(sorted([int(A[i]) for i in range(N)]))
ans = float('inf')
MIN = monster[0]

for i in range(N):
    tmp = monster[i]
    ans = min(ans, int(fractions.gcd(tmp, MIN)))

print(ans)