#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k, i;
  scanf("%d", &n);
  scanf("%d", &k);
  int a[n], f = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    if (a[i] == k) f = 1;
  }
  if (!f) {
    cout << "no\n";
    return;
  }
  if (n == 1) {
    cout << "yes\n";
    return;
  }
  int cnt = 0, size = 0;
  for (i = 0; i < n; i++) {
    if (a[i] >= k) {
      size++;
      cnt++;
    } else {
      cnt--;
      size++;
    }
    if (cnt < 0) {
      size = 0;
      cnt = 0;
    }
    if (cnt > 0 && size > 1) {
      cout << "yes\n";
      return;
    }
  }
  cout << "no\n";
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    solve();
  }
  return 0;
}
