#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int tc, n, k, a, last = -1;
  bool exis, kcan;
  cin >> tc;
  while (tc--) {
    cin >> n >> k;
    exis = kcan = false;
    cin >> a;
    if (a == k) exis = true;
    if (a >= k)
      last = 0;
    else
      last = -5;
    for (int x = 1; x < n; x++) {
      cin >> a;
      if (a == k) exis = true;
      if (a >= k) {
        if (last >= x - 2) {
          kcan = true;
        }
        last = x;
      }
    }
    if (exis && (kcan || n == 1))
      cout << "yes\n";
    else
      cout << "no\n";
  }
  return 0;
}
