#include <bits/stdc++.h>
using namespace std;
const int MOD = 998244353;
const long long mod = 1e9 + 7;
const int mxN = 1e5 + 9;
int ar[mxN];
void solve() {
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> ar[i];
  if (n == 1 && ar[1] == k) {
    cout << "yes\n";
    return;
  }
  bool found = false;
  for (int i = 1; i <= n; i++) {
    if (ar[i] == k) {
      found = true;
      break;
    }
  }
  if (!found) {
    cout << "no\n";
    return;
  }
  for (int i = 1; i <= n; i++) {
    if (ar[i] >= k) {
      if (i - 1 >= 1 && ar[i - 1] >= k) {
        cout << "yes\n";
        return;
      }
      if (i - 2 >= 1 && ar[i - 2] >= k) {
        cout << "yes\n";
        return;
      }
      if (i + 1 <= n && ar[i + 1] >= k) {
        cout << "yes\n";
        return;
      }
      if (i + 2 <= n && ar[i + 2] >= k) {
        cout << "yes\n";
        return;
      }
    }
  }
  cout << "no\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
