#include <bits/stdc++.h>
using namespace std;
const int N = 10000;
void solve() {
  long long int n, k;
  cin >> n >> k;
  long long int a[n + 5], pos[n + 5];
  vector<long long int> v;
  for (long long int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] == k) v.push_back(i);
  }
  if (n == 1) {
    if (a[0] == k)
      cout << "yes\n";
    else
      cout << "no\n";
    return;
  }
  long long int sz = v.size();
  if (sz) {
    for (long long int i = 1; i < n; i++) {
      if (a[i] >= k && a[i - 1] >= k) {
        cout << "yes\n";
        return;
      }
    }
    for (long long int i = 1; i < n - 1; i++) {
      if (a[i - 1] >= k && a[i + 1] >= k) {
        cout << "yes\n";
        return;
      }
    }
  }
  cout << "no\n";
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  srand(time(NULL));
  ;
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
}
