#include <bits/stdc++.h>
using namespace std;
void solve() {
  unsigned long long T;
  cin >> T;
  while (T--) {
    int n, k;
    cin >> n >> k;
    vector<int> v(n);
    bool f = 0;
    for (int i = 0; i < n; i++) {
      cin >> v[i];
      if (v[i] == k) f = 1;
    }
    if (!f) {
      cout << "no"
           << "\n";
      continue;
    }
    vector<int> para = v;
    sort(para.begin(), para.end());
    if (para[(n - 1) / 2] >= k) {
      cout << "yes"
           << "\n";
      continue;
    }
    f = 0;
    for (int i = 0; i < n; i++) {
      if (v[i] >= k && (i + 1 < n && v[i + 1] >= k)) f = 1;
      if (v[i] >= k && (i + 2 < n && v[i + 2] >= k)) f = 1;
    }
    if (f)
      cout << "yes"
           << "\n";
    else
      cout << "no"
           << "\n";
  }
}
int main() {
  solve();
  return 0;
}
