#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int t, n, k;
int a[maxn];
bool solve() {
  cin >> n >> k;
  bool flag = false;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (a[i] > k)
      a[i] = 2;
    else if (a[i] < k)
      a[i] = 0;
    else
      a[i] = 1, flag = true;
  }
  if (!flag) return 0;
  if (n == 1) return 1;
  for (int i = 1; i <= n; i++) {
    for (int j = i + 1; j <= n && j - i <= 2; j++) {
      if (a[i] && a[j]) return 1;
    }
  }
  return 0;
}
int main() {
  cin >> t;
  while (t--) {
    cout << (solve() ? "yes" : "no") << endl;
  }
  return 0;
}
