#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
set<int> s;
int a[N];
void solve() {
  int n, k;
  s.clear();
  scanf("%d%d", &n, &k);
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    s.insert(a[i]);
    if (a[i] >= k) cnt++;
  }
  if (!s.count(k)) {
    puts("no");
    return;
  }
  if (cnt > n / 2) {
    puts("yes");
    return;
  }
  for (int i = 3; i <= n; i++) {
    int x = 0;
    for (int j = i - 3 + 1; j <= i; j++) {
      if (a[j] >= k) x++;
    }
    if (x >= 2) {
      puts("yes");
      return;
    }
  }
  puts("no");
}
int main() {
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
