#include <bits/stdc++.h>
using namespace std;
const int N = 100007;
int n, k, a[N];
bool solve() {
  bool exists = false;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] == k) {
      exists = true;
    }
  }
  if (!exists) {
    return false;
  }
  if (n == 1) return true;
  for (int i = 0; i < n; ++i) {
    int ct = 0;
    for (int j = i; j < i + 3 && j < n; ++j) {
      if (a[j] >= k) {
        ct++;
      }
    }
    if (ct >= 2) {
      return true;
    }
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int t;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    if (solve()) {
      cout << "yes\n";
    } else {
      cout << "no\n";
    }
  }
  return 0;
}
