#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
void jpg() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int32_t main() {
  jpg();
  long long t;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    long long a[n + 3];
    memset(a, -1, sizeof a);
    for (long long i = 1; i <= n; i++) cin >> a[i];
    long long flag = 0, flag2 = 0;
    if (n == 1 && a[1] == k) {
      cout << "yes"
           << "\n";
      continue;
    }
    for (long long i = 1; i <= n; i++) {
      if (a[i] == k) flag2 = 1;
      if (a[i] >= k) {
        if (a[i + 1] >= k || a[i + 2] >= k) {
          flag = 1;
        }
      }
    }
    if (flag && flag2) {
      cout << "yes"
           << "\n";
    } else
      cout << "no"
           << "\n";
  }
}
