#include <bits/stdc++.h>
using namespace std;
using pll = pair<long long, long long>;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long t, i, x, j, y, z, k, n;
  long long tt;
  cin >> tt;
  for (long long _tt = 0; _tt < tt; _tt++) {
    cin >> n >> k;
    long long b, c;
    bool br = false;
    if (n == 1) {
      cin >> x;
      if (x == k)
        cout << "yes" << '\n';
      else
        cout << "no" << '\n';
      continue;
    }
    long long a[n];
    z = 0;
    for (i = 0; i < n; i += 1) {
      cin >> a[i];
      if (a[i] == k) z++;
      if (i > 0 && a[i] >= k && a[i - 1] >= k)
        br = true;
      else if (i > 1 && a[i] >= k && a[i - 2] >= k)
        br = true;
    }
    if (!z) {
      cout << "no" << '\n';
      continue;
    }
    for (i = 0; i < n - 1; i += 1) {
      if (a[i] >= k && a[i + 1] >= k) br = true;
      if (i < n - 2 && a[i] >= k && a[i + 2] >= k) br = true;
    }
    if (br) {
      cout << "yes" << '\n';
      continue;
    }
    cout << "no" << '\n';
  }
}
