#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
#define int long long
const int MOD = 1e9 + 7;
const int INF = LLONG_MAX / 2;
signed main() {
ios::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--) {
int n,k;
cin>>n>>k;
vector<int>arr(n);
for(int i=0;i<n;i++){
cin>>arr[i];
}
if(find(arr.begin(),arr.end(),k) == arr.end())cout<<"NO"<<endl;
else cout<<"YES"<<endl;
}
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgZW5kbCAnXG4nCiNkZWZpbmUgaW50IGxvbmcgbG9uZwogCmNvbnN0IGludCBNT0QgPSAxZTkgKyA3Owpjb25zdCBpbnQgSU5GID0gTExPTkdfTUFYIC8gMjsKIApzaWduZWQgbWFpbigpIHsKICAgIGlvczo6c3luY193aXRoX3N0ZGlvKGZhbHNlKTsgCiAgICBjaW4udGllKE5VTEwpOwogCiAgICBpbnQgdDsKICAgIGNpbiA+PiB0OwogICAgd2hpbGUgKHQtLSkgewogICAgICAgIGludCBuLGs7CiAgICAgICAgY2luPj5uPj5rOwogICAgICAgIHZlY3RvcjxpbnQ+YXJyKG4pOwogICAgICAgIGZvcihpbnQgaT0wO2k8bjtpKyspewogICAgICAgIAljaW4+PmFycltpXTsKICAgICAgICB9CiAgICAgICAgaWYoZmluZChhcnIuYmVnaW4oKSxhcnIuZW5kKCksaykgPT0gYXJyLmVuZCgpKWNvdXQ8PCJOTyI8PGVuZGw7CiAgICAgICAgZWxzZSBjb3V0PDwiWUVTIjw8ZW5kbDsKICAgIH0KICAgIAp9