#include <bits/stdc++.h>
using namespace std;
template <typename T>
using pq_asc = priority_queue<T, vector<T>, greater<T>>;
template <typename T>
ostream &JOUT(T s, T e, string sep = " ", ostream &os = cout) {
  if (s != e) {
    os << *s;
    ++s;
  }
  while (s != e) {
    os << sep << *s;
    ++s;
  }
  return os;
}
ostream &YES(bool cond, string yes = "Yes", string no = "No",
             ostream &os = cout) {
  if (cond) {
    os << yes << endl;
  } else {
    os << no << endl;
  }
  return os;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) {
  os << '(' << p.first << ", " << p.second << ')';
  return os;
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << '[';
  JOUT((v).begin(), (v).end(), ", ", os) << ']';
  return os;
}
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
void solve() {
  long long n;
  cin >> n;
  ;
  long long k;
  cin >> k;
  ;
  vector<long long> a(n);
  for (auto &i : a) cin >> i;
  ;
  if (n == 1) {
    YES(a[0] == k, "yes", "no");
    return;
  }
  bool exist_k = false;
  bool fillable = false;
  long long prev = -INF;
  for (long long i = 0; i < (n); ++i) {
    exist_k |= a[i] == k;
    if (a[i] >= k) {
      fillable |= i - prev <= 2;
      prev = i;
    }
  }
  YES(exist_k and fillable, "yes", "no");
}
int main() {
  long long t;
  cin >> t;
  ;
  for (long long i = 0; i < (t); ++i) {
    solve();
  }
}
