#include <bits/stdc++.h>
using namespace std;
const long long int N = 1e5 + 5;
void solve() {
  long long int c[N + 5];
  long long int n, k;
  cin >> n >> k;
  long long int flag = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> c[i];
    if (c[i] == k) flag = 1;
    if (c[i] >= k)
      c[i] = 1;
    else
      c[i] = 0;
  }
  if (flag == 0) {
    cout << "no" << endl;
    return;
  } else {
    c[n + 1] = c[n + 2] = 0;
    for (long long int i = 1; i <= n; i++) {
      if (c[i] && (c[i + 1] || c[i + 2])) {
        cout << "yes" << endl;
        return;
      }
    }
    if (n == 1 && c[1])
      cout << "yes" << endl;
    else
      cout << "no" << endl;
    return;
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int t = 1;
  cin >> t;
  while (t--) {
    solve();
  }
  return 0;
}
