#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long INF = 1LL << 60;
const long long mod = 1e9 + 7;
const long double eps = 1e-8;
const long double pi = acos(-1.0);
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
void solve() {
  int n, k;
  cin >> n >> k;
  vector<int> a(n), b(n);
  bool ok = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] > k)
      b[i] = 2;
    else if (a[i] == k)
      b[i] = 1;
    else
      b[i] = 0;
    if (a[i] == k) ok = 1;
  }
  if (n == 1 && b[0] == 1) {
    cout << "yes" << endl;
    return;
  }
  if (!ok) {
    cout << "no" << endl;
    return;
  }
  bool check = 0;
  for (int i = 0; i < n; i++) {
    if (i + 1 < n) {
      if (b[i] == 1) {
        if (b[i + 1] == 1 || b[i + 1] == 2) check = 1;
      } else if (b[i] == 2) {
        if (b[i + 1] == 1 || b[i + 1] == 2) check = 1;
      }
    }
    if (i + 2 < n) {
      vector<int> cnt(4, 0);
      for (int j = 0; j < 3; j++) {
        cnt[b[i + j]]++;
      }
      if (cnt[2] >= 2 || (cnt[2] >= 1 && cnt[1] >= 1) || cnt[1] >= 2) check = 1;
    }
  }
  if (check) {
    cout << "yes" << endl;
  } else {
    cout << "no" << endl;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 0; i < t; i++) solve();
  return 0;
}
