#include <bits/stdc++.h>
using namespace std;
void yes() { cout << "yes" << endl; }
void no() { cout << "no" << endl; }
void solve(int qq) {
  int n, k;
  cin >> n >> k;
  vector<int> a(n + 1);
  bool ok = false;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    ok |= (a[i] == k);
    if (a[i] == k) {
      a[i] = 1;
    } else if (a[i] < k) {
      a[i] = 0;
    } else {
      a[i] = 2;
    }
  }
  if (!ok) {
    no();
    return;
  }
  if (n == 1) {
    yes();
    return;
  }
  for (int l = 1; l < n; l++) {
    if (a[l] > 0 and a[l + 1] > 0) {
      yes();
      return;
    }
  }
  for (int l = 1; l < n - 1; l++) {
    if (a[l] > 0 and a[l + 2] > 0) {
      yes();
      return;
    }
  }
  no();
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t;
  cin >> t;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
