#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
void print() { cout << "\n"; }
template <class T>
void print(const T &x) {
  cout << x << "\n";
}
template <class T, class... Args>
void print(const T &x, const Args &...args) {
  cout << x << " ";
  print(args...);
}
template <class T>
void printVector(const vector<T> &v) {
  for (const T &x : v) {
    cout << x << " ";
  }
  cout << "\n";
}
using ll = long long;
const double EPS = 1e-7;
const int INF = 1 << 30;
const ll LLINF = 1LL << 60;
const double PI = acos(-1);
constexpr int MOD = 1000000007;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
void solve() {
  int n;
  ll k;
  cin >> n >> k;
  vector<ll> a(n);
  bool exist = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == k) {
      exist = 1;
    }
  }
  if (n == 1) {
    print(exist ? "yes" : "no");
    return;
  }
  if (!exist) {
    print("no");
    return;
  }
  vector<int> idx;
  for (int i = 0; i < n; i++) {
    if (a[i] >= k) {
      idx.emplace_back(i);
    }
  }
  for (int i = 1; i < idx.size(); i++) {
    if (idx[i - 1] + 2 >= idx[i]) {
      print("yes");
      return;
    }
  }
  print("no");
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
