#include <bits/stdc++.h>
using namespace std;
string to_string(string s) { return '"' + s + '"'; }
string to_string(char c) {
  string s = "'";
  s += c;
  return s + "'";
}
string to_string(const char* s) { return to_string((string)s); }
string to_string(bool b) { return (b ? "true" : "false"); }
template <typename A, typename B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <typename A>
string to_string(A v) {
  bool first = true;
  string res = "{";
  for (const auto& x : v) {
    if (!first) res += ", ";
    first = false;
    res += to_string(x);
  }
  res += "}";
  return res;
}
istream_iterator<string> eos;
void dbg_out(istream_iterator<string> it) { cerr << endl; }
template <typename Head, typename... Tail>
void dbg_out(istream_iterator<string> it, Head H, Tail... T) {
  cerr << *it << " = " << to_string(H);
  if (++it != eos) cerr << ", ";
  dbg_out(it, T...);
}
pair<long long, long long> dir[8] = {{-1, 0}, {1, 0},   {0, -1}, {0, 1},
                                     {1, 1},  {-1, -1}, {-1, 1}, {1, -1}};
const long long inf = (1LL << 60), mod = 1e9 + 7, nn = 2e5 + 5;
bool solve() {
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n + 1);
  bool ok = 0;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] == k) ok = 1;
  }
  if (!ok) return false;
  if (n == 1) return true;
  for (long long i = 1; i <= n; i++) {
    long long equal_or_greater = 0;
    for (long long j = i; j <= i + 2 && j <= n; j++) {
      equal_or_greater += (a[j] >= k);
    }
    if (equal_or_greater >= 2) return true;
  }
  return false;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long T = 1;
  cin >> T;
  for (long long tc = 1; tc <= T; tc++) {
    if (solve())
      cout << "yes\n";
    else
      cout << "no\n";
  }
  return 0;
}
