#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0)->sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int a[n];
    for (int i = 0; i < n; i++) cin >> a[i];
    if (!count(a, a + n, k)) {
      cout << "no"
           << "\n";
      continue;
    } else if (n == 1) {
      cout << (a[0] == k ? "yes" : "no") << "\n";
      continue;
    } else if (n == 2) {
      cout << ((a[0] == k && a[1] >= k) || (a[1] == k && a[0] >= k) ? "yes"
                                                                    : "no")
           << "\n";
      continue;
    }
    bool poss = 0;
    for (int i = 2; i < n; i++)
      poss |= (a[i - 2] >= k) + (a[i - 1] >= k) + (a[i] >= k) >= 2;
    cout << (poss ? "yes" : "no") << "\n";
  }
  return 0;
}
