#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
double pi = 2.0 * acos(0);
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout << fixed << setprecision(10);
}
long long int max2(long long int a, long long int b) {
  if (a > b) return a;
  return b;
}
long long int min2(long long int a, long long int b) {
  if (a < b) return a;
  return b;
}
long long int max3(long long int a, long long int b, long long int c) {
  return max2(a, max2(b, c));
}
long long int min3(long long int a, long long int b, long long int c) {
  return min2(a, min2(b, c));
}
void solve() {
  long long int n, k;
  cin >> n >> k;
  vector<long long int> arr(n + 3);
  arr[n] = arr[n + 1] = arr[n + 2] = -1;
  for (long long int i = (0); i <= (n - 1); i++) {
    cin >> arr[i];
  }
  bool c1 = false;
  bool c2 = false;
  for (long long int i = 0; i < n; i++) {
    if ((arr[i] >= k && arr[i + 1] >= k) || (arr[i] >= k && arr[i + 2] >= k))
      c2 = true;
    if (arr[i] == k) c1 = true;
    if (c1 && c2) break;
  }
  if ((c1 && c2) || (n == 1 && arr[0] == k))
    cout << "yes" << endl;
  else
    cout << "no" << endl;
}
signed main(void) {
  fast();
  long long int t;
  cin >> t;
  while (t--) solve();
}
