Buggy python submission (verdict: Runtime Error):
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...
#p(a)

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...
#p(a)

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1, N):
	g = gcd(g,a[i])
	if K%g==0:
		ans=PO
		break
else:
	ans=IM


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...
#p(a)

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(N):
	g = gcd(g,a[i])
	if K%g==0:
		ans=PO
		break
else:
	ans=IM


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
p = lambda  x: x #print(x)
 
PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""
 
# def fnc(a, ans):
# 	for i in range(N-1):
# 		if ans != "": break
# 		x = a[N-1-i]
# 		for j in range(N-1):
# 			y = a[j]
# 			if x-y == K:
# 				ans = PO
# 				break
# 			elif x-y < 0:
# 				break
# 			else:
# 				if (x-y) not in a:
# 					a.insert(0,x-y)
# 					print(a)
# 	else:
# 		ans = IM
	
 
N, K = map(int, input().split())		# 5 7
a = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
a.sort()
p(a)
 
if max(a)<K:
	ans = IM
 
if K in a:
	ans = PO
 
if ans == "":
	for i in range(N-2):
		x = a[i]
		p(x)
		for j in range(i+1, N-1):
			y = a[j]
			p(y)
			b = y%x
			p(b)
			if b!=0 and K%b == 0:
				ans = PO
				p("A")
				break
 
		if ans != "": break
	else:
		ans = IM
		p("B")
 
 
print(ans)

Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
#p = lambda  x: x #print(x)

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""

# def fnc(a, ans):
# 	for i in range(N-1):
# 		if ans != "": break
# 		x = a[N-1-i]
# 		for j in range(N-1):
# 			y = a[j]
# 			if x-y == K:
# 				ans = PO
# 				break
# 			elif x-y < 0:
# 				break
# 			else:
# 				if (x-y) not in a:
# 					a.insert(0,x-y)
# 					print(a)
# 	else:
# 		ans = IM
	

N, K = map(int, input().split())		# 5 7
a = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
a.sort()
#p(a)

if max(a)<K:
	ans = IM

if K in a:
	ans = PO

if ans == "":
	for i in range(N-2):
		x = a[i]
		#p(x)
		for j in range(i+1, N-1):
			y = a[j]
			#p(y)
			b = y%x
			#p(b)
			if b!=0 and K%b == 0:
				ans = PO
				#p("A")
				break

		if ans != "": break
	else:
		ans = IM
		#p("B")


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
p = lambda  x: x #print(x)

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""

# def fnc(a, ans):
# 	for i in range(N-1):
# 		if ans != "": break
# 		x = a[N-1-i]
# 		for j in range(N-1):
# 			y = a[j]
# 			if x-y == K:
# 				ans = PO
# 				break
# 			elif x-y < 0:
# 				break
# 			else:
# 				if (x-y) not in a:
# 					a.insert(0,x-y)
# 					print(a)
# 	else:
# 		ans = IM
	

N, K = map(int, input().split())		# 5 7
a = [int(i) for i in input().split()]	# 1 2 3 4 5 ...
a.sort()
p(a)

if max(a)<K:
	ans = IM

if K in a:
	ans = PO

if ans == "":
	for i in range(N-2):
		x = a[i]
		p(x)
		for j in range(i+1, N-1):
			y = a[j]
			p(y)
			b = y%x
			p(b)
			if b!=0 and K%b == 0:
				ans = PO
				p("A")
				break

		if ans != "": break
	else:
		ans = IM
		p("B")


print(ans)


Fixed submission:
import sys
from fractions import gcd

PO = "POSSIBLE"
IM = "IMPOSSIBLE"
ans = ""


N, K = map(int, input().split())		# 5 7
a = sorted(list(map(int, input().split())))	# 1 2 3 4 5 ...

if max(a)<K:
	print(IM)
	sys.exit()

if K in a:
	print(PO)
	sys.exit()

g=a[0]
for i in range(1,N):
	g = gcd(g,a[i])

if K%g==0:
	ans=PO
else:
	ans=IM


print(ans)