#include <iostream>
#include <unordered_map>
#include <vector>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
int n, k;
cin >> n >> k;
vector<int> nums(n);
for (int i = 0; i < n; ++i) {
cin >> nums[i];
}
unordered_map<int, int> hash; // 哈希表,用于存储已遍历过的元素及其下标
bool found = false;
for (int i = 0; i < n; ++i) {
int target = k - nums[i];
if (hash.count(target) > 0) {
found = true;
break;
}
hash[nums[i]] = i;
if (found) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
}}
return 0;
}