Buggy python submission (verdict: Runtime Error):
import functools
import fractions


N = int(input())
A = list(map(int, input().split()))
A = list(set(A))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.coount(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Fixed submission:
import functools
import fractions


N = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.count(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Buggy python submission (verdict: Runtime Error):
import functools
import fractions


N = int(input())
A = list(map(int, input().split()))
A = list(set(A))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    b = sorted(A)
    b.remove(i)
    if a.coount(i) == 1:
        ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Fixed submission:
import functools
import fractions


N = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.count(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import fractions


N = int(input())
A = list(map(int, input().split()))
gcd_ans = []
for i in range(N):
    A_sub = (A[0:i]+A[i+1:N]).copy()
    gcd = functools.reduce(fractions.gcd, A_sub)
    gcd_ans.append(gcd)
print(max(gcd_ans))

Fixed submission:
import functools
import fractions


N = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.count(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Buggy python submission (verdict: Runtime Error):
import functools
import fraction


N = int(input())
A = list(map(int, input().split()))
gcd_ans = []
for i in range(N):
    A_sub = (A[0:i]+A[i+1:N]).copy()
    gcd = functools.reduce(fraction.gcd, A_sub)
    gcd_ans.append(gcd)
print(max(gcd_ans))

Fixed submission:
import functools
import fractions


N = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.count(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))

Buggy python submission (verdict: Runtime Error):
import functools, math


N = int(input())
A = list(map(int, input().split()))
gcd_ans = []
for i in range(N):
    A_sub = (A[0:i]+A[i+1:N]).copy()
    gcd = functools.reduce(math.gcd, A_sub)
    gcd_ans.append(gcd)
print(max(gcd_ans))

Fixed submission:
import functools
import fractions


N = int(input())
a = list(map(int, input().split()))
A = list(set(a))
ans = [functools.reduce(fractions.gcd, A)]
if len(A) == 1:
    print(A[0])
    exit()
else:
    for i in A:
        b = sorted(A)
        b.remove(i)
        if a.count(i) == 1:
            ans.append(functools.reduce(fractions.gcd, b))
print(max(ans))