#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long INF = 998244353;
map<long long, set<long long> > mat;
set<long long> factorize(int n) {
  set<long long> res;
  res.insert(1);
  for (int i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      if (i * i == n)
        res.insert(i);
      else {
        res.insert(i);
        res.insert(n / i);
      }
    }
  }
  return res;
}
void fact() {
  for (int i = 1; i <= 100000; i++) {
    mat[i] = factorize(i);
  }
}
int main() {
  fact();
  int t = 1;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long a[n];
    for (auto &i : a) cin >> i;
    int f = 0;
    for (auto &i : a) {
      if (i < k)
        i = 0;
      else if (i > k)
        i = 2;
      else
        i = 1;
      if (i == 1) f = 1;
    }
    if (!f) {
      cout << "no\n";
      continue;
    }
    if (n == 1) {
      cout << "yes\n";
    } else {
      f = 0;
      for (int i = 0; i < n; i++) {
        if (f) break;
        for (int j = i + 1; j < n && j - i <= 2; j++) {
          if (a[i] && a[j]) {
            cout << "yes\n";
            f = 1;
            break;
          }
        }
      }
    }
    if (!f) {
      cout << "no\n";
      continue;
    }
  }
  return 0;
}
