#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100005;
inline long long read() {
  long long weight = 0, symbol = 1;
  char in = getchar();
  while (!isdigit(in)) {
    if (in == '-') symbol = -1;
    in = getchar();
  }
  while (isdigit(in)) {
    weight = weight * 10 + in - '0';
    in = getchar();
  }
  return symbol * weight;
}
long long T;
long long n, k;
long long a[MAXN];
bool check() {
  if (n == 1) return (a[1] == 1);
  for (long long i = 1; i <= n; i++) {
    for (long long j = i + 1; j <= n && j - i <= 2; j++) {
      if (a[i] && a[j]) return 1;
    }
  }
  return 0;
}
signed main() {
  T = read();
  while (T--) {
    bool flag = 0;
    n = read(), k = read();
    for (long long i = 1; i <= n; i++) {
      a[i] = read();
      if (a[i] < k) a[i] = 0;
      if (a[i] == k) a[i] = 1, flag = 1;
      if (a[i] > k) a[i] = 2;
    }
    if (!flag) {
      puts("no");
      continue;
    }
    puts(check() ? "yes" : "no");
  }
  return 0;
}
