#include <bits/stdc++.h>
int i, j;
using namespace std;
void solve() {
  long long int n, k;
  cin >> n >> k;
  int a[n];
  for (i = 0; i < n; ++i) cin >> a[i];
  int f1 = 0, f2 = 0;
  if (n == 1) {
    if (a[0] == k)
      cout << "yes\n";
    else
      cout << "no\n";
    return;
  }
  if (n == 2) {
    if (a[0] > a[1]) swap(a[0], a[1]);
    if (a[0] == k and a[1] >= k)
      cout << "yes\n";
    else
      cout << "no\n";
    return;
  }
  for (i = 0; i < n - 2; ++i) {
    int x = a[i], y = a[i + 1], z = a[i + 2];
    if (x > y) swap(x, y);
    if (y > z) swap(y, z);
    if (x > y) swap(x, y);
    if (x == k or y == k or z == k) f1 = 1;
    if (y >= k and z >= k) f2 = 1;
  }
  if (f1 and f2)
    cout << "yes\n";
  else
    cout << "no\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) solve();
}
