Buggy python submission (verdict: Time Limit Exceeded):
# coding: utf-8
import fractions

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [numbers[0]]
for i in range(1, n):
    l_list.append(fractions.gcd(l_list[i - 1], numbers[i]))

r_list = [numbers[len(numbers) - 1]]
for i in reversed(range(0, n - 1)):
    r_list.insert(0, fractions.gcd(r_list[0], numbers[i]))

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, fractions.gcd(l, r))
print(ans)


Fixed submission:
# coding: utf-8
import fractions

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [0 for i in range(n)]
l_list[0] = numbers[0]
for i in range(1, n):
    l_list[i] = fractions.gcd(l_list[i-1], numbers[i])

r_list = [0 for i in range(n)]
r_list[n-1] = numbers[n-1]
for i in reversed(range(0, n - 1)):
    r_list[i] = fractions.gcd(r_list[i+1], numbers[i])

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, fractions.gcd(l, r))
print(ans)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import math

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [numbers[0]]
for i in range(1, n):
    l_list.append(math.gcd(l_list[i - 1], numbers[i]))

r_list = [numbers[len(numbers) - 1]]
for i in reversed(range(0, n - 1)):
    r_list.insert(0, math.gcd(r_list[0], numbers[i]))

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, math.gcd(l, r))
print(ans)


Fixed submission:
# coding: utf-8
import fractions

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [0 for i in range(n)]
l_list[0] = numbers[0]
for i in range(1, n):
    l_list[i] = fractions.gcd(l_list[i-1], numbers[i])

r_list = [0 for i in range(n)]
r_list[n-1] = numbers[n-1]
for i in reversed(range(0, n - 1)):
    r_list[i] = fractions.gcd(r_list[i+1], numbers[i])

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, fractions.gcd(l, r))
print(ans)

Buggy python submission (verdict: Runtime Error):
# coding: utf-8
import math

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [numbers[0]]
for i in range(1, n):
    l_list.append(math.gcd(l_list[i - 1], numbers[i]))

r_list = [numbers[len(numbers) - 1]]
for i in reversed(range(0, n - 1)):
    r_list.insert(0, math.gcd(r_list[0], numbers[i]))

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, math.gcd(l, r))
print(ans)


Fixed submission:
# coding: utf-8
import fractions

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [0 for i in range(n)]
l_list[0] = numbers[0]
for i in range(1, n):
    l_list[i] = fractions.gcd(l_list[i-1], numbers[i])

r_list = [0 for i in range(n)]
r_list[n-1] = numbers[n-1]
for i in reversed(range(0, n - 1)):
    r_list[i] = fractions.gcd(r_list[i+1], numbers[i])

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, fractions.gcd(l, r))
print(ans)

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

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]


def get_gcm(num1: int, num2: int):
    if num1 % num2 == 0:
        return num2
    return get_gcm(num2, num1 % num2)


l_list = [numbers[0]]
for i in range(1, n):
    l_list.append(get_gcm(l_list[i - 1], numbers[i]))

r_list = [numbers[len(numbers) - 1]]
for i in reversed(range(0, n - 1)):
    r_list.insert(0, get_gcm(r_list[0], numbers[i]))

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, get_gcm(l, r))
print(ans)


Fixed submission:
# coding: utf-8
import fractions

n = int(input().rstrip())
numbers = [int(i) for i in input().rstrip().split(" ")]

l_list = [0 for i in range(n)]
l_list[0] = numbers[0]
for i in range(1, n):
    l_list[i] = fractions.gcd(l_list[i-1], numbers[i])

r_list = [0 for i in range(n)]
r_list[n-1] = numbers[n-1]
for i in reversed(range(0, n - 1)):
    r_list[i] = fractions.gcd(r_list[i+1], numbers[i])

ans = 0
for i in range(n):
    l = 0
    if i > 0:
        l = l_list[i - 1]
    r = 0
    if i < n - 1:
        r = r_list[i + 1]
    if l == 0:
        l = r
    if r == 0:
        r = l
    ans = max(ans, fractions.gcd(l, r))
print(ans)