#include<bits/stdc++.h>
using namespace std;
int t;
int main()
{
cin>>t;
while(t--)
{
int n=0,x=0,a[6]={0,0,0,0,0,0},x1=0;
bool v=false;
cin>>n>>x;
for(int i=1; i<=n; i++)
{
cin>>a[i];
x1=x;
x1+=a[i];
if(x1<x&&x%a[i]!=0)
{
v=true;
break;
}
else if(x1>x)
{
v=true;
break;
}
}
if(v)
{
cout<<"Yes"<<endl;
}
else
{
cout<<"No"<<endl;
}
}
return 0;
}