#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn], b[maxn];
void solve() {
  int n, k, f = 0, mi = 0;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == k) f = 1;
    if (a[i] >= k)
      b[i] = 1;
    else
      b[i] = -1;
  }
  if (!f) return (void)puts("no");
  f = 0;
  for (int i = 1; i <= n; i++) b[i] += b[i - 1];
  if (b[n] > 0) f = 1;
  for (int i = 2; i <= n; i++) {
    if (b[i] > mi) {
      f = 1;
      break;
    }
    mi = min(mi, b[i - 1]);
  }
  puts((f ? "yes" : "no"));
}
int main() {
  int _;
  scanf("%d", &_);
  while (_--) solve();
}
