#include <bits/stdc++.h>
using namespace std;
long double PI = acosl(-1);
const long long infl = 3e18 + 100;
const int inf = 1e9 + 100;
const int nmax = 2e5 + 10;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int tc;
  cin >> tc;
  while (tc--) {
    int n, k;
    cin >> n >> k;
    int cnt = 0;
    vector<int> arr(n + 1);
    vector<int> koi;
    for (int i = 1; i <= n; i++) {
      cin >> arr[i];
      if (arr[i] == k) cnt++, koi.push_back(i);
    }
    if (cnt * 2 > n) {
      cout << "yes\n";
      continue;
    }
    if (koi.size() == 0) {
      cout << "no\n";
      continue;
    }
    bool hobe = false;
    for (int i = 1; i <= n; i++) {
      if (arr[i] >= k) {
        if (i > 1 and arr[i - 1] > arr[i]) hobe = true;
        if (i > 2 and (arr[i - 1] >= arr[i] or arr[i - 2] >= arr[i]))
          hobe = true;
        if (i < n and arr[i + 1] > arr[i]) hobe = true;
        if (i < n - 1 and (arr[i + 1] >= arr[i] or arr[i + 2] >= arr[i]))
          hobe = true;
      }
    }
    if (hobe)
      cout << "yes\n";
    else
      cout << "no\n";
  }
}
