#include <bits/stdc++.h>
using namespace std;
long long n, k;
vector<long long> a;
bool ok() {
  cin >> n >> k;
  bool fl = false;
  a.resize(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    if (a[i] == k) fl = true;
    a[i] = (a[i] < k ? -1 : 1);
  }
  if (!fl) return false;
  if (n == 1) return true;
  int num = 0;
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    num += 1;
    sum += a[i];
    if (sum > 0 && num > 1) return true;
    if (a[i] > 0) num = sum = 1;
  }
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) cout << (ok() ? "yes\n" : "no\n");
  return 0;
}
