#include <bits/stdc++.h>
using namespace std;
FILE* in = stdin;
FILE* out = stdout;
const int MAX = 100001;
int n, k;
int a[MAX];
bool solve() {
  vector<int> indexes;
  for (int i = 0; i < n; i++)
    if (a[i] == k) indexes.push_back(i);
  if ((int)indexes.size() == n) return true;
  if (indexes.empty()) return false;
  for (int i = 0; i < n; i++) {
    if (i + 1 < n && a[i] >= k && a[i + 1] >= k) return true;
    if (i + 2 < n && a[i] >= k && a[i + 2] >= k) return true;
  }
  return false;
}
int main(void) {
  int numTests;
  fscanf(in, "%d", &numTests);
  for (int t = 0; t < numTests; t++) {
    fscanf(in, "%d %d", &n, &k);
    for (int i = 0; i < n; i++) fscanf(in, "%d", &a[i]);
    fprintf(out, "%s\n", solve() ? "yes" : "no");
  }
  return 0;
}
