#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int A[N];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  cin >> t;
  while (t--) {
    int cnt = 0, f = 0, ck = 0, k;
    int n, m;
    cin >> n >> k;
    for (int i = 1; i <= n; i++) {
      cin >> A[i];
      cnt += (i > 1 && (A[i] == k) && (A[i - 1] == k));
      f |= A[i] == k;
      ck += A[i] == k;
    }
    if (!f) {
      cout << "no" << '\n';
      continue;
    }
    if (cnt) {
      cout << "yes" << '\n';
      continue;
    }
    if (n == 1) {
      cout << "yes" << '\n';
      continue;
    }
    multiset<int> st;
    st.insert(0);
    bool pos = false;
    for (int i = 1; i <= n && !pos; ++i) {
      if (i + 1 <= n && A[i] >= k && A[i + 1] >= k) {
        pos = 1;
      }
      if (A[i] >= k && i + 2 <= n && A[i + 2] >= k) {
        pos = 1;
      }
    }
    cout << (pos ? "yes" : "no") << '\n';
  }
  return 0;
}
