#include <bits/stdc++.h>
using namespace std;
inline bool isprime(long long num) {
  if (num == 2 || num == 3) return true;
  if (num % 6 != 1 && num % 6 != 5) return false;
  for (int i = 5; 1ll * i * i <= num; i += 6) {
    if (num % i == 0 || num % (i + 2) == 0) return false;
  }
  return true;
}
const int mod = 1e9 + 7;
inline long long mul(long long a, long long b, long long c) {
  return (a * b - (long long)((long double)a * b / c) * c + c) % c;
}
inline long long exgcd(long long a, long long b, long long &x, long long &y) {
  if (!b) {
    x = 1;
    y = 0;
    return a;
  }
  long long g = exgcd(b, a % b, y, x);
  y -= a / b * x;
  return g;
}
inline long long quick_pow(long long a, long long b, long long mod) {
  long long res = 1;
  while (b) {
    if (b & 1) res = mul(res, a, mod);
    a = mul(a, a, mod);
    b >>= 1;
  }
  return res;
}
inline long long quick_pow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) res = mul(res, a, mod);
    a = mul(a, a, mod);
    b >>= 1;
  }
  return res;
}
inline long long inv(long long x) { return quick_pow(x, mod - 2); }
inline long long inv(long long x, long long mod) {
  return quick_pow(x, mod - 2, mod);
}
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
const int N = 1e5 + 10;
int a[N];
int b[N];
void solve() {
  int n, k;
  scanf("%d %d", &n, &k);
  int ans = -1;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    b[i] = 0;
    if (a[i] == k) ans = 0;
    if (a[i] >= k) b[i] = 1;
  }
  if (ans == -1) {
    printf("no\n");
  } else {
    b[n + 1] = b[n + 2] = 0;
    for (int i = 1; i <= n; i++)
      if (b[i] && (b[i + 1] | b[i + 2])) ans = 1;
    if (n == 1 && a[1] == k) ans = 1;
    if (ans == 1)
      printf("yes\n");
    else
      printf("no\n");
  }
}
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
