N=int(input())
M=list(map(int, input().split()))
ans=min(M)
mn=min(M)
from math import gcd
for m in M:
  if m%mn!=0:
    ans=min(ans, gcd(mn,m))
print(ans) N=int(input()) N int(input()) int input() input M=list(map(int, input().split())) M list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ans=min(M) ans min(M) min M mn=min(M) mn min(M) min M from math import gcd for m in M:
  if m%mn!=0:
    ans=min(ans, gcd(mn,m)) m M if m%mn!=0:
    ans=min(ans, gcd(mn,m)) m%mn!=0 m%mn m mn 0 ans=min(ans, gcd(mn,m)) ans min(ans, gcd(mn,m)) min ans gcd(mn,m) gcd mn m print(ans) print ans M=list(map(int, input().split())) list(map(int, input().split())) M ans=min(M) min(M) ans N=int(input()) int(input()) N ans=min(ans, gcd(mn,m)) min(ans, gcd(mn,m)) ans mn=min(M) min(M) mn
N=int(input())
M=list(map(int, input().split()))
ans=min(M)
mn=min(M)
from math import gcd
for m in M:
  if m%mn!=0:
    ans=min(ans, gcd(mn,m))
print(ans)
