#include <bits/stdc++.h>
using namespace std;
long double eps = (long double)1 / 1e6;
long long inf = 1e18, mod1 = 1e9 + 7, mod2 = 998244353;
template <typename T>
T sqr(T a) {
  return a * a;
}
template <typename T>
T qb(T a) {
  return a * a * a;
}
long long gcd(long long a, long long b) { return !a ? b : gcd(b % a, a); }
long long binpow(long long a, long long b, long long mod) {
  return b ? (b % 2 ? (a * (sqr(binpow(a, b / 2, mod)) % mod)) % mod
                    : sqr(binpow(a, b / 2, mod)) % mod)
           : 1;
}
long long binmult(long long a, long long b, long long mod) {
  return b ? (b % 2 ? (2 * binmult(a, b / 2, mod) + a) % mod
                    : (2 * binmult(a, b / 2, mod)) % mod)
           : 0;
}
int a[100001];
int main() {
  cout.tie(0), cin.tie(0), ios_base::sync_with_stdio(0);
  int i, q, n, k;
  cin >> q;
  while (q--) {
    cin >> n >> k;
    bool e = 0, b = 0;
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      a[i] = (a[i] > k ? 1 : (a[i] == k ? 0 : -1));
      if (!a[i]) b = 1;
    }
    if (n == 1) {
      cout << (!a[1] ? "yes" : "no") << '\n';
      continue;
    }
    for (i = 1; i <= n; i++) {
      if (a[i] == -1) continue;
      if (i < n - 1 && a[i + 2] > -1) e = 1;
      if (i < n && a[i + 1] > -1) e = 1;
      if (e) break;
    }
    cout << (b && e ? "yes" : "no") << '\n';
  }
  return 0;
}
