#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int a[MAXN], b[MAXN];
bool chert;
int t, n, k;
void input();
void solve();
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  input();
  return 0;
}
void input() {
  cin >> t;
  while (t--) {
    chert = false;
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == k) chert = true;
      (a[i] >= k) ? a[i] = 1 : a[i] = -1;
    }
    solve();
  }
}
void solve() {
  if (!chert) {
    cout << "no" << endl;
    return;
  }
  if (n == 1) {
    cout << "yes" << endl;
    return;
  }
  for (int i = 0; i < n; i++) {
    b[i] = a[i];
    if (i != 0) b[i] = max(b[i], b[i] + b[i - 1]);
    if (i != 0 && a[i] + b[i - 1] > 0) {
      cout << "yes" << endl;
      return;
    }
  }
  cout << "no" << endl;
}
