#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
long long t = 1, n, k, a[200010];
bool found, can;
bool check(long long a, long long b, long long c) {
  int counter = 0;
  if (a >= k) counter++;
  if (b >= k) counter++;
  if (c >= k) counter++;
  return counter > 1;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    can = found = false;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == k) found = true;
    }
    if (!found) {
      cout << "no" << '\n';
      continue;
    }
    if (n == 1) {
      cout << "yes" << '\n';
      continue;
    }
    if (n == 2 && check(a[0], a[1], 0)) {
      cout << "yes" << '\n';
      continue;
    }
    if (n == 2) {
      cout << "no" << '\n';
      continue;
    }
    for (int i = 0; i < n - 2; i++)
      if (check(a[i], a[i + 1], a[i + 2])) can = true;
    cout << (can ? "yes" : "no") << '\n';
  }
  return 0;
}
