#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 50;
const int INF = 1e9 + 7;
int T, n, k, a[N];
void Main() {
  scanf("%d%d", &n, &k);
  int ct = 0;
  bool ok = false, flg = false;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    ct += a[i] == k;
    if (a[i] == k && n == 1) ok = true;
    if (a[i] >= k && a[i - 1] >= k) flg = true;
    if (a[i] >= k && a[i - 2] >= k) flg = true;
    if (a[i] == k && a[i - 1] == k) ok = true;
    if (a[i - 1] == k && a[i] >= k) ok = true;
    if (a[i] == k && a[i - 1] >= k) ok = true;
  }
  if (ok) return puts("yes"), void();
  if (flg && ct)
    puts("yes");
  else
    puts("no");
}
int main() {
  scanf("%d", &T);
  while (T--) Main();
  return 0;
}
