#include <bits/stdc++.h>
using namespace std;
const int maxn = 100005;
int n, k, a[maxn], tmp, bj;
int lol() {
  bj = 0;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &tmp);
    if (tmp < k) a[i] = 0;
    if (tmp >= k) a[i] = 1;
    if (tmp == k) bj = 1;
  }
  if (bj == 0) 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;
  scanf("%d", &t);
  while (t--) {
    puts(lol() ? "yes" : "no");
  }
  return 0;
}
