#include <bits/stdc++.h>
using namespace std;
const int MAXN = 200001;
const int mod = 1000000007;
int main() {
  int T;
  cin >> T;
  while (T--) {
    long long n, k;
    cin >> n >> k;
    long long a[n];
    for (int i = 0; i < n; ++i) cin >> a[i];
    bool poss = 0, prsnt = 0;
    int sm = 0, lg = 0;
    for (int i = 0; i < n; ++i) {
      if (a[i] == k) {
        prsnt = 1;
      } else if (a[i] > k)
        lg++;
      else
        sm++;
    }
    for (int i = 1; i < n; ++i) {
      if (a[i] >= k && a[i - 1] >= k) {
        poss = 1;
        break;
      }
    }
    for (int i = 1; i < n - 1; ++i) {
      if (a[i - 1] >= k && a[i + 1] >= k) {
        poss = 1;
        break;
      }
    }
    if (sm < lg + (n - lg - sm)) {
      poss = 1;
    }
    poss = poss && prsnt;
    if (poss)
      cout << "yes\n";
    else
      cout << "no\n";
  }
}
