#include <bits/stdc++.h>
using namespace std;
long long inf = 1e9;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  cin >> TESTS;
  while (TESTS--) {
    long long n, k;
    cin >> n >> k;
    long long arr[n + 2];
    vector<long long> vec;
    vec.push_back(1);
    long long con = 0;
    long long less[n + 2], eq[n + 2];
    less[0] = 0;
    eq[0] = 0;
    for (long long i = 1; i <= n; i++) {
      cin >> arr[i];
      if (arr[i] == k) {
        vec.push_back(i);
        con++;
      }
      less[i] = less[i - 1];
      eq[i] = eq[i - 1];
      if (arr[i] == k) eq[i]++;
      if (arr[i] < k) less[i]++;
    }
    if (con == 0) {
      cout << "no" << endl;
      continue;
    }
    vec.push_back(n);
    arr[0] = 0;
    arr[n + 1] = 0;
    less[n + 1] = less[n];
    eq[n + 1] = eq[n];
    long long done = 0;
    for (long long i = 1; i < vec.size() - 1; i++) {
      long long j = vec[i];
      if (arr[j + 1] >= k) {
        done = 1;
        break;
      }
      if (arr[j - 1] >= k) {
        done = 1;
        break;
      }
    }
    for (long long i = 1; i < n; i++) {
      if (arr[i] >= k && arr[i + 1] >= k) {
        done = 1;
        break;
      }
    }
    for (long long i = 1; i < n - 1; i++) {
      if (arr[i] >= k && arr[i + 2] >= k) {
        done = 1;
        break;
      }
    }
    if (done) {
      cout << "yes" << endl;
      continue;
    }
    for (long long i = 0; i < vec.size() - 1; i++) {
      long long st = vec[i];
      long long en = vec[i + 1];
      long long min = less[en] - less[st - 1];
      long long eqq = eq[en] - eq[st - 1];
      long long sz = en - st + 1;
      if (sz <= 1) continue;
      long long re = (sz + 1) / 2;
      if ((min < re && eqq + min >= re)) {
        done = 1;
        break;
      }
    }
    long long req = (n + 1) / 2;
    if ((less[n] < req && eq[n] + less[n] >= req) || (done == 1)) {
      cout << "yes" << endl;
      continue;
    }
    if (done)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
