#include <bits/stdc++.h>
using namespace std;
const int MAX = 1000010;
const int MOD2 = 998244353;
const int MOD = 1000000007;
const int INF = 1e8;
const long long int LLINF = 0x3f3f3f3f3f3f3f3f;
const long double EPS = 1e-7;
const long long int boun = 1000000000LL;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << *it << " = " << a << '\n';
  err(++it, args...);
}
void solve() {
  long long int n, k;
  cin >> n >> k;
  vector<long long> a(n);
  int isitthere = 0;
  for (int i = 0; i < (int)n; i++) {
    cin >> a[i];
    if (a[i] == k) isitthere = 1;
  }
  if (isitthere == 0) {
    cout << "no" << '\n';
    return;
  }
  int flag = 0;
  if (n < 2) {
    if (a[0] == k)
      cout << "yes" << '\n';
    else
      cout << "no" << '\n';
    return;
  } else {
    for (int i = 0; i <= n - 3; i++) {
      if (a[i] >= k) {
        if (a[i + 1] >= k || a[i + 2] >= k) {
          flag = 1;
          break;
        }
      }
    }
    if (flag == 0 && a[n - 2] >= k && a[n - 1] >= k) {
      flag = 1;
    }
    if (flag)
      cout << "yes" << '\n';
    else {
      cout << "no" << '\n';
    }
  }
}
int main() {
  int tt;
  cin >> tt;
  while (tt--) {
    solve();
  }
  return 0;
}
