input()

n=list(map(int,input().split()))

[print(x)for x in range(1,min(n)+1)if sum(m%x for m in n)==0]

n=int(input())

s=list(map(int,input().split()))

a,b=s[:2]

while b:a,b=b,a%b

if n-2:

 b=s[2]

 while b:a,b=b,a%b

[print(x)for x in range(1,a+1)if a%x==0]

input()
n = list(map(int, input().split()))
[print(x) for x in range(1, min(n) + 1) if sum(m % x for m in n) == 0]

n = int(input())
s = list(map(int, input().split()))
a, b = s[:2]
while b:
    a, b = b, a % b
if n - 2:
    b = s[2]
    while b:
        a, b = b, a % b
[print(x) for x in range(1, a + 1) if a % x == 0]

-input() -n = list(map(int, input().split())) -[print(x) for x in range(1, min(n) + 1) if sum(m % x for m in n) == 0] +n = int(input()) +s = list(map(int, input().split())) +a, b = s[:2] +while b: +    a, b = b, a % b +if n - 2: +    b = s[2] +    while b: +        a, b = b, a % b +[print(x) for x in range(1, a + 1) if a % x == 0]