#include <bits/stdc++.h>
using namespace std;
const long long N = 2e5 + 5;
const long long mod = 1e9 + 7;
long long n, m, k, t, x, y, z;
long long a[N];
bool solve(long long ans = 0) {
  cin >> n >> k;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  long long fg = 0;
  for (long long i = 1; i <= n; i++)
    if (a[i] == k) fg = 1;
  if (!fg) return false;
  if (n == 1) return true;
  fg = 0;
  long long t = 0;
  for (long long i = 1; i <= n; i++) {
    if (a[i] >= k)
      t++;
    else
      t--;
    if (fg && t > 0) return true;
    if (a[i] >= k) fg = 1;
    if (t < 0) t = 0, fg = 0;
  }
  return false;
}
int main() {
  ios::sync_with_stdio(false);
  int T;
  cin >> T;
  while (T--)
    if (solve())
      cout << "yes" << '\n';
    else
      cout << "no" << '\n';
}
