#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long inf = 1e18;
long long m_inf = INT_MIN;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  std::cout.unsetf(std::ios::fixed);
  std::cout.precision(9);
  long long t = 1;
  cin >> t;
  while (t--) {
    long long n, k;
    cin >> n >> k;
    vector<long long> arr(n);
    for (long long i = 0; i < n; i++) cin >> arr[i];
    bool flag1 = false, flag2 = false;
    if (n == 1 && arr[0] == k) {
      cout << "yes\n";
      continue;
    }
    for (long long i = 0; i < n; i++) {
      if (arr[i] == k) {
        flag1 = true;
        break;
      }
    }
    if (!flag1) {
      cout << "no\n";
      continue;
    }
    for (long long i = 0; i < n - 1; i++) {
      if (arr[i + 1] >= k && arr[i] >= k) {
        flag2 = true;
        break;
      }
      if (i + 2 < n && arr[i + 2] >= k && arr[i] >= k) {
        flag2 = true;
        break;
      }
    }
    if (flag2) {
      cout << "yes\n";
    } else
      cout << "no\n";
  }
}
