#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using uint = unsigned int;
template <class T>
using V = vector<T>;
template <class T>
using VV = vector<vector<T>>;
template <class T, class U>
void chmax(T& x, U y) {
  if (x < y) x = y;
}
template <class T, class U>
void chmin(T& x, U y) {
  if (y < x) x = y;
}
template <class T>
void mkuni(V<T>& v) {
  sort(v.begin(), v.end());
  v.erase(unique(v.begin(), v.end()), v.end());
}
template <class S, class T>
ostream& operator<<(ostream& o, const pair<S, T>& p) {
  return o << "(" << p.first << "," << p.second << ")";
}
template <class T>
ostream& operator<<(ostream& o, const vector<T>& vc) {
  o << "{";
  for (const T& v : vc) o << v << ",";
  o << "}";
  return o;
}
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n - 1); }
bool solve() {
  int N, X;
  cin >> N >> X;
  V<int> a(N);
  for (int i = 0; i < int(N); i++) {
    int x;
    cin >> x;
    if (x < X)
      a[i] = -1;
    else if (x == X)
      a[i] = 0;
    else
      a[i] = 1;
  }
  {
    bool has0 = false;
    for (int i = 0; i < int(N); i++)
      if (a[i] == 0) has0 = true;
    if (!has0) return false;
  }
  if (N == 1) return true;
  for (int i = 0; i < int(N - 1); i++) {
    if (a[i] >= 0 && a[i + 1] >= 0) return true;
  }
  for (int i = 0; i < int(N - 2); i++) {
    if (a[i] >= 0 && a[i + 1] < 0 && a[i + 2] >= 0) return true;
  }
  return false;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(20);
  int T;
  cin >> T;
  while (T--) {
    if (solve())
      cout << "yes\n";
    else
      cout << "no\n";
  }
}
