#include <bits/stdc++.h>
using namespace std;
template <class T>
void printvec(vector<T>& x, int a, int b) {
  for (int i = (a); i <= (b); i++) cout << x[i] << " ";
  cout << "\n";
}
const double PI = acos((double)-1);
const double EPSILON = 1e-7;
const int N = 1e6 + 1;
const int NN = 1e3 + 1;
const long long MOD = 1e9 + 7;
const long long oo = LLONG_MAX;
const int BASE = 10000;
const int di[4] = {-1, 0, 1, 0};
const int dj[4] = {0, 1, 0, -1};
void query() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int check = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i] == k) {
      check = 1;
    }
  }
  if (!check) {
    cout << "no"
         << "\n";
    return;
  }
  if (n <= 2) {
    int t = 1e9 + 123;
    for (int i = 1; i <= n; i++) {
      t = min(t, a[i]);
    }
    cout << (t == k ? "yes" : "no") << "\n";
    return;
  }
  for (int i = 1; i <= n - 2; i++) {
    vector<int> tmp;
    for (int j = i; j <= i + 2; j++) {
      tmp.push_back(a[j]);
    }
    sort((tmp).begin(), (tmp).end());
    if (tmp[1] >= k) {
      cout << "yes"
           << "\n";
      return;
    }
  }
  cout << "no"
       << "\n";
}
void solve() {
  int t;
  cin >> t;
  while (t--) {
    query();
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cout << fixed << setprecision(10);
  solve();
  cerr << "Time elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
