#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  int q;
  cin >> q;
  for (int i1 = 0; i1 < q; i1++) {
    int n, k;
    cin >> n >> k;
    bool o = false;
    vector<int> a(n);
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == k) o = true;
    }
    if (!o) {
      cout << "no"
           << "\n";
      continue;
    }
    if (n == 1) {
      cout << "yes"
           << "\n";
      continue;
    }
    o = false;
    for (int i = 0; i < n; i++)
      if (a[i] >= k)
        for (int j = i + 1; j < min(n, i + 3); j++)
          if (a[j] >= k) o = true;
    if (o)
      cout << "yes"
           << "\n";
    else
      cout << "no"
           << "\n";
  }
}
