Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
temp_A = A
for i in range(N):
    temp_A = copy.deepcopy(A)
    del temp_A[i]
    l.append(gcd_list(temp_A))

print(max(l))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
sorted_A = sorted(A)
ind = 0
for i in range(1, len(A)):
    if gcd_list([sorted_A[0], sorted_A[i]]) == 1:
        ind = i
        break
if ind == 0:
    ind = 1
for i in [0,ind]:
    sorted_A = sorted(A)
    del sorted_A[i]
    l.append(gcd_list(sorted_A))

print(max(l))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
temp_A = A
for i in range(N):
    temp_A = copy.deepcopy(A)
    del temp_A[i]
    l.append(gcd_list(temp_A))

print(max(l))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
sorted_A = sorted(A)
ind = 0
for i in range(1, len(A)):
    if gcd_list([sorted_A[0], sorted_A[i]]) == 1:
        ind = i
        break
if ind == 0:
    ind = 1
for i in [0,ind]:
    sorted_A = sorted(A)
    del sorted_A[i]
    l.append(gcd_list(sorted_A))

print(max(l))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
temp_A = A
for i in range(N):
    temp_A = copy.deepcopy(A)
    del temp_A[i]
    l.append(gcd_list(temp_A))

print(max(l))

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
sorted_A = sorted(A)
ind = 0
for i in range(1, len(A)):
    if gcd_list([sorted_A[0], sorted_A[i]]) == 1:
        ind = i
        break
if ind == 0:
    ind = 1
for i in [0,ind]:
    sorted_A = sorted(A)
    del sorted_A[i]
    l.append(gcd_list(sorted_A))

print(max(l))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

ans = 1
temp_A = A
for i in range(N):
    temp_A = copy.deepcopy(A)
    del temp_A[i]
    ans = max(ans, gcd_list(temp_A))

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
sorted_A = sorted(A)
ind = 0
for i in range(1, len(A)):
    if gcd_list([sorted_A[0], sorted_A[i]]) == 1:
        ind = i
        break
if ind == 0:
    ind = 1
for i in [0,ind]:
    sorted_A = sorted(A)
    del sorted_A[i]
    l.append(gcd_list(sorted_A))

print(max(l))

Buggy python submission (verdict: Runtime Error):
N = int(input())
A = list(map(int, input().split()))

import math
import copy
from functools import reduce

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

ans = 1
temp_A = A
for i in range(N):
    temp_A = copy.deepcopy(A)
    del temp_A[i]
    ans = max(ans, gcd_list(temp_A))

print(ans)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

import fractions
import copy
from functools import reduce

#最大公約数を求める関数
def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

l = []
sorted_A = sorted(A)
ind = 0
for i in range(1, len(A)):
    if gcd_list([sorted_A[0], sorted_A[i]]) == 1:
        ind = i
        break
if ind == 0:
    ind = 1
for i in [0,ind]:
    sorted_A = sorted(A)
    del sorted_A[i]
    l.append(gcd_list(sorted_A))

print(max(l))