#include <bits/stdc++.h>
const long long inf = 0x3f3f3f3f3f3f3f3LL;
const long long mod = (long long)1e9 + 7;
using namespace std;
template <class T, class T2>
void smin(T& a, T2 val) {
  if (a > val) a = val;
}
template <class T, class T2>
void smax(T& a, T2 val) {
  if (a < val) a = val;
}
const long long N = (long long)1e5 + 10;
long long n, k;
class Solution {
 public:
  long long longestWPI(vector<long long> hours) {
    long long i, n = hours.size();
    long long start = 1, dist = INT_MIN;
    vector<long long> prefix(n + 1, 0), best(n + 1, INT_MIN);
    for (i = 1; i <= n; i++) prefix[i] = prefix[i - 1] + hours[i - 1];
    best[n] = prefix[n];
    for (i = n - 1; i > -1; i--) best[i] = max(best[i + 1], prefix[i]);
    for (i = 1; i <= n; i++) {
      if (prefix[start - 1] < best[i])
        dist = max(dist, i - start + 1);
      else
        start++;
    }
    return dist == INT_MIN ? 0 : dist;
  }
};
void solve() {
  cin >> n >> k;
  long long mx = 0;
  map<long long, bool> M;
  vector<long long> a(n);
  for (long long i = 0; i < n; ++i) {
    cin >> a[i];
    M[a[i]] = 1;
    smax(mx, a[i]);
    if (a[i] >= k) {
      a[i] = 1;
    } else {
      a[i] = -1;
    }
  }
  if (M.count(k) == 0) {
    cout << "no";
    return;
  }
  if (n == 1) {
    cout << "yes";
    return;
  };
  Solution s;
  long long ans = s.longestWPI(a);
  ;
  if (ans > 1) {
    cout << "yes";
  } else {
    cout << "no";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t = 1;
  cin >> t;
  while (t--) {
    solve();
    cout << '\n';
  }
  return 0;
}
