#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
constexpr int mod = 1e9 + 7;
template <typename T>
void print(vector<vector<T>> v) {
  for (int i = 0; i < (int)v.size(); ++i) {
    cout << i << " : ";
    for (int j = 0; j < (int)v[i].size(); ++j) {
      cout << v[i][j] << " ";
    }
    cout << endl;
  }
  cout << endl;
}
template <typename T>
void arr(T *a, int n) {
  for (int i = 0; i < n; ++i) {
    cout << a[i] << " ";
  }
  cout << endl;
}
vector<int> seive(vector<int> &v) {
  int n = (int)v.size();
  vector<int> primes;
  for (int i = 2; i < n; ++i) {
    if (v[i] == 0) {
      primes.push_back(i);
      for (int j = i; j < n; j += i) v[j] = i;
    }
  }
  return primes;
}
long long power_mod(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) {
      ans = (ans % mod * a % mod) % mod;
    }
    a = (a % mod * a % mod) % mod;
    b /= 2;
  }
  return ans;
}
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long tc;
  cin >> tc;
  while (tc--) {
    long long n, x;
    cin >> n >> x;
    vector<long long> v(n);
    for (long long i = 0; i < n; ++i) cin >> v[i];
    bool poss = 0;
    if (n == 1 && v[0] == x) poss = 1;
    vector<long long> gt;
    bool pres = 0;
    for (long long i = 0; i < n; ++i) {
      if (v[i] >= x) {
        gt.push_back(i);
      }
      if (v[i] == x) pres = 1;
    }
    for (long long i = 1; i < (long long)gt.size(); ++i) {
      long long y = gt[i] - gt[i - 1];
      if ((y == 2 || y == 1) && pres) {
        poss = 1;
      }
    }
    if (poss) {
      cout << "yes"
           << "\n";
    } else {
      cout << "no"
           << "\n";
    }
  }
}
