#include <bits/stdc++.h>
using namespace std;
void debug_out() { cerr << endl; }
template <typename T>
string to_string(const vector<T>& vc, int w) {
  if (w + 1 == vc.size()) return to_string(vc[w]);
  return to_string(vc[w]) + "," + to_string(vc, w + 1);
}
template <typename T>
string to_string(const vector<T>& vc) {
  return "{" + to_string(vc, 0) + "}";
}
template <typename Head, typename... Tail>
void debug_out(Head H, Tail... T) {
  cerr << " " << to_string(H);
  debug_out(T...);
}
class DebugStream {
} LOG;
template <typename T>
DebugStream& operator<<(DebugStream& s, const T&) {
  return s;
}
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
const int maxN = 1e5 + 9, maxV = 1e6 + 9, MOD = 1e9 + 7, SQ = 335, lg = 20,
          bs = 29;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> arr(n);
    bool can = 0;
    for (auto& el : arr) {
      cin >> el;
      if (el == k) can = 1;
      if (el >= k)
        el = 1;
      else
        el = -1;
    }
    auto fn = [&]() {
      for (int i = 0; i + 2 <= n; i++) {
        int sm = arr[i];
        for (int j = 1; i + j < n && j <= 2; j++) {
          sm += arr[i + j];
          if (sm >= 1) return true;
        }
      }
      return false;
    };
    cout << (can && (n == 1 || fn()) ? "yes" : "no") << '\n';
  }
}
