from fractions import*

from numpy import*



def dv(n):

    divisors = []

    for i in range(1, int(n**0.5)+1):

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    return divisors



n,*a=list(map(int,open(0).read().split()))

a=array(a)

l=[1]

for i in set(dv(a[0])+dv(a[1])):

    if sum(a%i==0)>=n-1:

        l.append(i)

print((max(l)))
from itertools import*

from fractions import*

n,*a=list(map(int,open(0).read().split()))

b=list(accumulate([0]+a,gcd))

c=list(accumulate([0]+a[::-1],gcd))

print((max(gcd(s,t)for s,t in zip(b,c[::-1][1:]))))
from fractions import *
from numpy import *


def dv(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    return divisors


n, *a = list(map(int, open(0).read().split()))
a = array(a)
l = [1]
for i in set(dv(a[0]) + dv(a[1])):
    if sum(a % i == 0) >= n - 1:
        l.append(i)
print((max(l)))

from itertools import *
from fractions import *

n, *a = list(map(int, open(0).read().split()))
b = list(accumulate([0] + a, gcd))
c = list(accumulate([0] + a[::-1], gcd))
print((max(gcd(s, t) for s, t in zip(b, c[::-1][1:]))))

+from itertools import * -from numpy import * - - -def dv(n): -    divisors = [] -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            divisors.append(i) -            if i != n // i: -                divisors.append(n // i) -    return divisors - -a = array(a) -l = [1] -for i in set(dv(a[0]) + dv(a[1])): -    if sum(a % i == 0) >= n - 1: -        l.append(i) -print((max(l))) +b = list(accumulate([0] + a, gcd)) +c = list(accumulate([0] + a[::-1], gcd)) +print((max(gcd(s, t) for s, t in zip(b, c[::-1][1:]))))