#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
const double pi = acos(-1.0);
const long long mod = 1e9 + 7;
int n, k;
int a[MAXN], b[MAXN], z[MAXN], f[MAXN];
void solve() {
  scanf("%d %d", &n, &k);
  int t = 0;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    if (a[i] < k)
      b[i] = 0;
    else if (a[i] == k) {
      b[i] = 1;
      t = 1;
    } else
      b[i] = 2;
  }
  int flag = 0, last = -10;
  for (int i = 1; i <= n; i++) {
    int cnt = 0;
    for (int j = 0; j < 3; j++)
      if (b[i + j] >= 1) cnt++;
    if (cnt > 1) flag = 1;
  }
  if ((flag && t) || (n == 1 && a[1] == k))
    puts("yes");
  else
    puts("no");
  for (int i = 1; i <= n; i++) b[i] = 0;
}
int main() {
  int T = 1;
  scanf("%d", &T);
  while (T--) solve();
}
