#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 3;
int n, k;
int T[N + 3], w[N + 3], m[N + 3], r[N + 3];
bool yes;
vector<pair<int, int> > v;
int B[N + 3];
int solve() {
  v.clear();
  cin >> n >> k;
  bool byl = false, inny = false;
  for (int i = 1; i <= n; i++) {
    r[i] = 0;
    m[i] = 0;
    w[i] = 0;
    yes = false;
  }
  for (int i = 1; i <= n; i++) {
    cin >> T[i];
    if (T[i] < k) {
      inny = true;
      m[i] = m[i - 1] + 1;
      B[i] = 0;
    } else if (T[i] == k) {
      byl = true;
      B[i] = 1;
      r[i] = r[i - 1] + 1;
    } else {
      B[i] = 2;
      inny = true;
      w[i] = w[i - 1] + 1;
    }
  }
  if (byl && !inny) {
    return 1;
  } else if (!byl) {
    return 0;
  }
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n && j - i <= 2; ++j)
      if (B[i] && B[j]) return 1;
  return 0;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int q;
  cin >> q;
  while (q--) {
    if (solve()) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
}
