#include <bits/stdc++.h>
using namespace std;
void program();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  program();
}
const long long INF = std::numeric_limits<long long>::max() / 2;
void program() {
  long long T;
  cin >> T;
  while (T--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> a(n), ml(n), mr(n), rl(n), rr(n);
    for (long long i = 0; i < n; i++) cin >> a[i];
    long long rs = -1;
    for (long long i = 0; i < n; i++) {
      long long v;
      if (a[i] >= k)
        v = 1;
      else
        v = -1;
      if (rs >= 0) {
        rs = rs + v;
        if (rs >= 1) {
          ml[i] = 1;
        }
      } else {
        rs = v;
      }
      if (i > 0) {
        ml[i] = max(ml[i], ml[i - 1]);
      }
      rl[i] = rs;
    }
    rs = -1;
    for (long long i = n - 1; i >= 0; i--) {
      long long v;
      if (a[i] >= k)
        v = 1;
      else
        v = -1;
      if (rs >= 0) {
        rs = rs + v;
        if (rs >= 1) {
          mr[i] = 1;
        }
      } else {
        rs = v;
      }
      if (i < n - 1) {
        mr[i] = max(mr[i], mr[i + 1]);
      }
      rr[i] = rs;
    }
    bool good = false;
    if (n == 1 && a[0] == k) good = true;
    for (long long i = 0; i < n; i++) {
      if (a[i] == k) {
        if (i > 0 && ml[i - 1]) {
          good = true;
        }
        if (i < n - 1 && mr[i + 1]) {
          good = true;
        }
        if (i > 0 && a[i - 1] >= k) {
          good = true;
        }
        if (i < n - 1 && a[i + 1] >= k) {
          good = true;
        }
        if (i > 0 && rl[i - 1] == 0) {
          good = true;
        }
        if (i < n - 1 && rr[i + 1] == 0) {
          good = true;
        }
      }
    }
    cout << (good ? "yes" : "no") << "\n";
  }
}
