#include <bits/stdc++.h>
using namespace std;
long long mod(long long n) {
  if (n < 0) return -n;
  return n;
}
void solve() {
  long long i = 0, j, k, l, n, m, g, s, r, t, x, y, q, ans = 0;
  cin >> n >> m;
  long long a[n];
  g = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == m) g = 1;
    if (a[i] >= m)
      a[i] = 1;
    else
      a[i] = -1;
  }
  if (g == 0) {
    cout << "no\n";
    return;
  }
  if (n == 1) {
    cout << "yes\n";
    return;
  }
  for (i = 1; i < n; i++)
    if (a[i] == 1 && a[i - 1] == 1) {
      cout << "yes\n";
      return;
    }
  for (i = 2; i < n; i++)
    if (a[i] == 1 && a[i - 2] == 1) {
      cout << "yes\n";
      return;
    }
  {
    cout << "no\n";
    return;
  }
}
signed main() {
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
