#include <bits/stdc++.h>
using namespace std;
const int ONE = 200005;
const int INF = 2147483640;
int get() {
  int res = 1, Q = 1;
  char c;
  while ((c = getchar()) < 48 || c > 57)
    if (c == '-') Q = -1;
  if (Q) res = c - 48;
  while ((c = getchar()) >= 48 && c <= 57) res = res * 10 + c - 48;
  return res * Q;
}
int T, n;
int k, a[ONE];
int f[ONE];
vector<int> A;
int Deal() {
  n = get(), k = get();
  int pd = 0, x;
  A.clear();
  for (int i = 1; i <= n; i++) {
    x = get();
    if (x == k) pd = 1;
    if (x >= k) A.push_back(i);
  }
  if (A.size() == 0 || pd == 0) return 0;
  if (n == 1) return 1;
  for (int i = 1; i < A.size(); i++)
    if (A[i] - A[i - 1] <= 2) return 1;
  return 0;
}
int main() {
  T = get();
  while (T--) Deal() == 1 ? puts("yes") : puts("no");
}
