#include <bits/stdc++.h>
using namespace std;
template <typename TYPE>
inline void chkmax(TYPE &first, TYPE second) {
  first < second ? first = second : TYPE();
}
template <typename TYPE>
inline void chkmin(TYPE &first, TYPE second) {
  second < first ? first = second : TYPE();
}
template <typename TYPE>
void readint(TYPE &first) {
  first = 0;
  int f = 1;
  char c;
  for (c = getchar(); !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) first = first * 10 + c - '0';
  first *= f;
}
const int MAXN = 500005;
int n, k, a[MAXN];
bool solve() {
  readint(n), readint(k);
  bool flag = 0;
  for (int i = 1; i <= n; ++i) {
    readint(a[i]);
    if (a[i] < k)
      a[i] = 0;
    else if (a[i] > k)
      a[i] = 2;
    else
      a[i] = 1;
    if (a[i] == 1) flag = 1;
  }
  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() {
  int T;
  readint(T);
  while (T--) printf(solve() ? "yes\n" : "no\n");
  return 0;
}
