Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = list(map(int, input().split()))
import math
import functools
gcd = functools.reduce(math.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSEBLE')
else:
    print('IMPOSSIBLE')

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
import fractions
import functools
gcd = functools.reduce(fractions.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
A = list(map(int, input().split()))
import math
import functools
gcd = functools.reduce(math.gcd, A)
print(gcd)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSEBLE')
else:
    print('IMPOSSIBLE')

Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
import fractions
import functools
gcd = functools.reduce(fractions.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))
import itertools
flag = True
while(flag):
    count = 0
    if K in A:
        flag = False
        break
    A_2 = list(itertools.combinations(A,2))
    for comb in A_2:
        diff = abs(comb[0] - comb[1])
        if diff not in A:
            A.append(diff)
        else:
            count += 1
    else:
        if (count == len(A_2)):
            flag = False
if K in A:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')



Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
import fractions
import functools
gcd = functools.reduce(fractions.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))
import itertools
flag = True
while(flag):
    count = 0
    A_2 = list(itertools.combinations(A,2))
    for comb in A_2:
        diff = abs(comb[0] - comb[1])
        if diff not in A:
            A.append(diff)
        else:
            count += 1
    else:
        if (count == len(A_2)) or (K in A):
            flag = False
if K in A:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')



Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
import fractions
import functools
gcd = functools.reduce(fractions.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
A = list(map(int, input().split()))
import itertools
flag = True
while(flag):
    count = 0
    A_2 = list(itertools.combinations(A,2))
    for comb in A_2:
        diff = abs(comb[0] - comb[1])
        if diff not in A:
            A.append(diff)
        else:
            count += 1
    else:
        if (count == len(A_2)):
            flag = False
if K in A:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')



Fixed submission:
N, K = map(int, input().split())
A = list(map(int, input().split()))
import fractions
import functools
gcd = functools.reduce(fractions.gcd, A)
A_max = max(A)
if (A_max >= K and K % gcd == 0):
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')