#include <bits/stdc++.h>
using namespace std;
inline void read(int &x) {
  char ch = getchar();
  x = 0;
  while (!isdigit(ch)) ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - 48, ch = getchar();
}
const int N = 1e5 + 10;
int n, a[N], s[N], c[N << 1];
inline void add(int x) {
  for (; x; x -= (x & (-x))) ++c[x];
}
inline void _add(int x) {
  for (; x; x -= (x & (-x))) --c[x];
}
inline int ask(int x) {
  int res = 0;
  for (; x <= (n << 1); x += (x & (-x))) res += c[x];
  return res;
}
signed main() {
  int T;
  read(T);
  while (T--) {
    int k, ok = 0, kk = 0;
    read(n), read(k);
    for (int i = 1; i <= n; ++i) read(a[i]);
    for (int i = 1; i <= n; ++i)
      if (a[i] == k) {
        kk = 1;
        break;
      }
    if (n == 1) {
      a[1] == k ? puts("yes") : puts("no");
      continue;
    }
    if (n == 2) {
      if (a[1] == k && a[2] >= k || a[2] == k && a[1] >= k)
        puts("yes");
      else
        puts("no");
      continue;
    }
    for (int i = 3; i <= n; ++i) {
      int c = 0;
      for (int j = i - 2; j <= i; ++j) c += (a[j] >= k);
      if (c >= 2) {
        ok = 1;
        break;
      }
    }
    (ok && kk) ? puts("yes") : puts("no");
  }
  return 0;
}
