#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
const double eps = 1e-12;
const double PI = acos(-1.0);
const int mod = 998244353;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
int ar[100050];
void solve() {
  int n, k;
  cin >> n >> k;
  bool exi = false, gp = false;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    if (ar[i] == k) exi = true;
  }
  for (int i = 1; i < n; i++) {
    if (ar[i] >= k && (ar[i + 1] >= k || i < n - 1 && ar[i + 2] >= k)) {
      gp = true;
      break;
    }
  }
  if (n == 1 && ar[1] == k || exi && gp)
    cout << "yes\n";
  else
    cout << "no\n";
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int T;
  cin >> T;
  for (int t = 1; t <= T; t++) {
    solve();
  }
  return 0;
}
