#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using lpair = pair<ll, ll>;
const ll MOD = 1e9 + 7;
const ll INF = 1e18;
void print() {}
template <class H, class... T>
void print(H&& h, T&&... t) {
  cout << h << " \n"[sizeof...(t) == 0];
  print(forward<T>(t)...);
}
void solve() {
  ll N, K;
  cin >> N >> K;
  vector<ll> a(N);
  for (ll i = (0); i < (N); i++) cin >> a[i];
  bool ok = false;
  for (ll i = (0); i < (N); i++) {
    if (a[i] == K) ok = true;
  }
  if (not ok) {
    print("no");
    return;
  }
  if (N == 1) {
    print("yes");
  } else if (N == 2) {
    if (a[0] >= K && a[1] >= K) {
      print("yes");
    } else {
      print("no");
    }
  } else {
    vector<ll> cnt(N, 0);
    for (ll i = (0); i < (N); i++) {
      if (a[i] >= K) {
        cnt[i]++;
      }
    }
    for (ll i = (0); i < (N - 2); i++) {
      if (cnt[i] + cnt[i + 1] + cnt[i + 2] >= 2) {
        print("yes");
        return;
      }
    }
    print("no");
  }
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll t;
  cin >> t;
  while (t--) solve();
}
