#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <typename H, typename... T>
void debug_out(H h, T... t) {
  cerr << " " << (h);
  debug_out(t...);
}
using int64 = long long int;
vector<int> ReadInts(std::istream& in, int n) {
  vector<int> a(n);
  for (auto& it : a) {
    in >> it;
  }
  return a;
}
template <typename A>
void Print(std::ostream& out, const vector<A>& a) {
  for (auto& it : a) {
    out << it << " ";
  }
  out << endl;
}
class DOracAndMedians {
  void SolveOne(std::istream& in, std::ostream& out) {
    int n, k;
    in >> n >> k;
    auto data = ReadInts(in, n);
    if (n == 1) {
      if (data[0] == k) {
        out << "yes" << endl;
        return;
      }
      out << "no" << endl;
      return;
    }
    bool can = false, has_k = false;
    for (int i = 0; i < data.size(); i++) {
      has_k |= data[i] == k;
      if (data[i] >= k) {
        if ((i + 1) < n && data[i + 1] >= k) can = true;
        if ((i + 2) < n && data[i + 2] >= k) can = true;
      }
    }
    if (has_k && can)
      out << "yes" << endl;
    else
      out << "no" << endl;
  }

 public:
  void solve(std::istream& in, std::ostream& out) {
    int TC;
    in >> TC;
    while (TC--) {
      SolveOne(in, out);
    }
  }
};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  DOracAndMedians solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
