Getting Wrong answer for "Paying up" problem in python

from itertools import combinations
try:
t=int(input())
for i in range(t):
n,m=[int(i) for i in input().split()]
list1=[]
for j in range(n):
a=int(input())
if j<=m:
list1.append(a)
value=False
for k in range(1,n+1):
for ordered_pairs in combinations(list1,k):
if sum(ordered_pairs)==m:
value=True
if value==True:
print(“Yes”)
else:
print(“No”)
except:
pass

This is my code for “Paying up” problem statement.It was successfully running and printing output in IDE.But,throwing a “wrong answer” error during submission.Do anyone please let me know what’s wrong with my code??