#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n);
  for (auto &x : v) cin >> x;
  bool ok = 0;
  if (n == 1) ok = v[0] == k;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n && j < i + 3; j++) {
      if (v[i] >= k && v[j] >= k) {
        ok = 1;
        break;
      }
    }
  }
  if (!count(v.begin(), v.end(), k)) ok = 0;
  if (ok)
    cout << "yes\n";
  else
    cout << "no\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
