#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
template <class A, class B>
ostream& operator<<(ostream& out, const pair<A, B>& p) {
  return out << "(" << p.first << ", " << p.second << ")";
}
template <class A>
ostream& operator<<(ostream& out, const vector<A>& v) {
  out << "[";
  for (long long i = 0; i < v.size(); i++) {
    if (i) out << ", ";
    out << v[i];
  }
  return out << "]";
}
const long long N = 1e5, T = 1e5 + 1, INF = 1e12;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long qw;
  cin >> qw;
  while (qw--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> f(n);
    for (long long i = 0; i < n; i++) cin >> f[i];
    long long ok = 0, was = 0;
    for (long long i = 0; i < n; i++) {
      if (f[i] == k) {
        was++;
      }
      if (f[i] >= k) {
        if (i - 1 >= 0 && f[i - 1] >= k || i + 1 <= n - 1 && f[i + 1] >= k)
          ok = 1;
        if (i - 2 >= 0 && f[i - 2] >= k || i + 2 <= n - 1 && f[i + 2] >= k)
          ok = 1;
      }
    }
    if (was && ok || was == n) {
      cout << "yes\n";
    } else
      cout << "no\n";
  }
}
