#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  long long ar[n];
  bool flag = true;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    if (ar[i] < k)
      ar[i] = 0;
    else if (ar[i] > k)
      ar[i] = 2;
    else {
      ar[i] = 1;
      flag = false;
    }
  }
  if (flag) {
    cout << "no" << endl;
    return;
  } else if (n == 1) {
    cout << "yes" << endl;
    return;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n && j - i <= 2; j++)
      if (ar[i] && ar[j]) {
        cout << "yes" << endl;
        return;
      }
  cout << "no" << endl;
  return;
}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
