//headers
#include<bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include
using namespace __gnu_pbds;
#include
using namespace std;
//typedefenum name
typedef long long int ll;
//define
#define ll long long int
#define rtest ll t;cin>>t;while(t–)
#define rin ll n;cin>>n;
#define r2in ll n,o;cin>>n>>o;
#define r3in ll n,o,p;cin>>n>>o>>p;
#define jloop(m,n) for(ll j=m;j<n;j++)
#define kloop(m,n) for(ll k=m;k<n;k++)
int printSubsequences(int arr[], int n,int o)
{
int sum=0;
/* Number of subsequences is (2**n -1)*/
unsigned int opsize = pow(2, n);
/* Run from counter 000..1 to 111..1*/
for (int counter = 1; counter < opsize; counter++)
{
sum=0;
for (int j = 0; j < n; j++)
{
/* Check if jth bit in the counter is set
If set then print jth element from arr[] */
if (counter & (1<<j))
//cout << arr[j] << " ";
sum=sum+arr[j];
//cout<<" sum "<<sum <<endl;
if(sum==o)
{
return 1;
}
}
//cout << endl;
}
return 0;
}
int main()
{
//file handling
#ifndef ONLINE_JUDGE
freopen(“i.txt”, “r”, stdin);
freopen(“o.txt”, “w”, stdout);
#endif
rtest
{
r2in
int a[n];
jloop(0,n)
{
cin>>a[j];
}
sort(a,a+n);
int max;
jloop(0,n)
{
if(a[j]<=o)
{
max=j;
}
}
int res= printSubsequences(a,max+1,o);
if(res==0)
cout<<"No"<<endl;
else
cout<<"Yes"<<endl;
}
return 0;
}