#include <bits/stdc++.h>
using namespace std;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
int32_t main() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int64_t t;
  cin >> t;
  while (t--) {
    int64_t n, k;
    cin >> n >> k;
    vector<int64_t> ar(n);
    for (int64_t i = 0; i < n; i++) cin >> ar[i];
    bool a = 0, b = 0;
    for (int64_t i = 0; i < n; i++) {
      if (ar[i] == k) a = 1;
      for (int64_t j = 1; j <= 2 && i + j < n; j++) {
        if (ar[i] >= k && ar[i + j] >= k) b = 1;
      }
    }
    if ((a && b) || (n == 1 && a))
      cout << "yes"
           << "\n";
    else
      cout << "no"
           << "\n";
  }
}
