#include <bits/stdc++.h>
using namespace std;
long long a[500005];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i, j, k, l, m;
  long long t;
  cin >> t;
  long long pret = t;
  while (t--) {
    cin >> n >> k;
    for (i = 1; i <= n; i++) cin >> a[i];
    int flag1 = 0;
    int flag2 = 0;
    for (i = 1; i <= n; i++) {
      if (a[i] == k) {
        flag1 = 1;
      }
      if (a[i] != k) {
        flag2 = 1;
      }
    }
    if (flag1 == 0) {
      cout << "no\n";
      continue;
    }
    if (flag2 == 0) {
      cout << "yes\n";
      continue;
    }
    a[n + 1] = 0;
    int flag = 0;
    for (i = 1; i <= n - 1; i++) {
      if (min(a[i], a[i + 1]) >= k) {
        flag = 1;
        break;
      }
    }
    for (i = 2; i <= n - 1; i++) {
      vector<long long> v;
      v.push_back(a[i - 1]);
      v.push_back(a[i + 1]);
      v.push_back(a[i]);
      sort(v.begin(), v.end());
      if (v[1] >= k) flag = 1;
    }
    if (flag)
      cout << "yes\n";
    else
      cout << "no\n";
  }
}
