#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vl = vector<ll>;
using vvl = vector<vl>;
using pll = pair<ll, ll>;
const ll oo = 0x3f3f3f3f3f3f3f3fLL;
const double eps = 1e-9;
int main() {
  cin.sync_with_stdio(0);
  ll t;
  cin >> t;
  ;
  while (t--) {
    ll n;
    cin >> n;
    ;
    ll k;
    cin >> k;
    ;
    vl as(n);
    for (ll INPUT_VL_I = (0); INPUT_VL_I < (n); INPUT_VL_I++) {
      cin >> as[INPUT_VL_I];
    };
    bool has_k = false;
    for (ll a : as) {
      if (a == k) {
        has_k = true;
      }
    }
    while (ll((as).size()) < 3) {
      as.push_back(0);
    }
    bool possible = n == 1;
    for (ll i = (2); i < (ll((as).size())); i++) {
      if ((as[i - 2] >= k) + (as[i - 1] >= k) + (as[i] >= k) >= 2) {
        possible = true;
      }
    }
    if (has_k && possible) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
}
