Buggy python submission (verdict: Time Limit Exceeded):
#-*- using:utf-8 -*-

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

def gcd(a,b):
#    print("gcd %d %d" %(a,b))
    n = 0
    if a == b:
        return a
    elif a > b:
        n = euclidean(a,b)

    elif a < b:
        n = euclidean(b,a)

    else:
        pass

    return n 

def blackboard(n,a):
    candidate = 0
    maxnum = 0
    b = list(map(int,a))


    k = n - 1
    for j in range(n):
        c = [b[p] for p in range(n)]
        del c[j]
#        print("b %s" %b)
#        print("c %s" %c)
        ml = 0
        mr = 0
        for i in range(k):
#            print("i=>%d" %i)

            ml = gcd(ml,c[i])
            mr = gcd(mr,c[k-i-1])
#            print("ml %d" %ml)
#            print("mr %d" %mr)
            if i == k-i-1:
                break
#        print("ml %d mr %d" %(ml,mr))
        candidate = gcd(ml,mr)
#        print("!!!!!!!!!!!!!!!!candidate %d max %d" %(candidate,maxnum))
        if candidate > maxnum:
            maxnum = candidate
            
#        print("maxnum %d" %maxnum)
        


    return maxnum


if __name__ == '__main__':
    n = raw_input()
    a = raw_input().split()
    global m 
    m = int(n)
    print("%d" %(blackboard(m,a)))


Fixed submission:
#-*- using:utf-8 -*-
def euclidean(a,b):
    if b == 0:
        return a
    else:
        return  euclidean(b,a%b)

def gcd(a,b):
#    print("gcd %d %d" %(a,b))
    n = 0
    if a == b:
        return a
    elif a > b:
        n = euclidean(a,b)

    elif a < b:
        n = euclidean(b,a)

    else:
        pass

    return n

def blackboard(n,a):
    candidate = 0
    maxnum = 0
    b = list(map(int,a))

    left = [0] * (n+1)
    right = [0] * (n+1)
    for i in range(n):
        left[i+1] = gcd(left[i],b[i])
        right[i+1] = gcd(right[i],b[n - i -1])

    for i in range(n):
        candidate = gcd(left[i],right[n-i-1])
        if candidate > maxnum:
            maxnum = candidate

    return maxnum


if __name__ == '__main__':
    n = raw_input()
    a = raw_input().split()
    m = int(n)
    print("%d" %(blackboard(m,a)))

Buggy python submission (verdict: Runtime Error):
#-*- using:utf-8 -*-

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

def gcd(a,b):
#    print("gcd %d %d" %(a,b))
    n = 0
    if a == b:
        return a
    elif a > b:
        n = euclidean(a,b)

    elif a < b:
        n = euclidean(b,a)

    else:
        pass

    return n

def left(i,a):
    cd = 0
    for p in range(i):
        #cd0 = left(0) = 0
        #cd1 = left(1) = gcd(cd0,a[0])
        #cd2 = left(2) = gcd(cd1,a[1])
#        print("left %d %d" %(cd,a[p]))
        cd = gcd(cd,a[p])
#        print("left %d" %cd)
    return cd

def right(i,a):
    cd = 0
    for p in range(i,m)[::-1]:
        #cdn+1 = right(n+1) = 0
        #cdn   = right(n)   = gcd(cdn+1,a[n])
        #cdn-1 = right(n-1) = gcd(cdn,a[n-1])
#        print("right %d %d" %(cd,a[p]))
        cd = gcd(cd,a[p])
#        print("right %d" %cd)
    return cd

def blackboard(n,a):
    candidate = 0
    maxnum = 0
    b = list(map(int,a))

    p = m // 2 # round down
    q = -(-m // 2) #round up
#    print("i %d j %d" %(p,q))
    maxnum = gcd(left(p,b),right(q,b))

    return maxnum
  
  if __name__ == '__main__':
    n = raw_input()
    a = raw_input().split()
    global m
    m = int(n)
    print("%d" %(blackboard(m,a)))

Fixed submission:
#-*- using:utf-8 -*-
def euclidean(a,b):
    if b == 0:
        return a
    else:
        return  euclidean(b,a%b)

def gcd(a,b):
#    print("gcd %d %d" %(a,b))
    n = 0
    if a == b:
        return a
    elif a > b:
        n = euclidean(a,b)

    elif a < b:
        n = euclidean(b,a)

    else:
        pass

    return n

def blackboard(n,a):
    candidate = 0
    maxnum = 0
    b = list(map(int,a))

    left = [0] * (n+1)
    right = [0] * (n+1)
    for i in range(n):
        left[i+1] = gcd(left[i],b[i])
        right[i+1] = gcd(right[i],b[n - i -1])

    for i in range(n):
        candidate = gcd(left[i],right[n-i-1])
        if candidate > maxnum:
            maxnum = candidate

    return maxnum


if __name__ == '__main__':
    n = raw_input()
    a = raw_input().split()
    m = int(n)
    print("%d" %(blackboard(m,a)))