#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
int A[N];
int P[N];
int M[N];
void solve();
bool check(int n);
int main() {
  int t;
  scanf("%d", &t);
  while (t--) solve();
}
void solve() {
  int n, k;
  scanf("%d%d", &n, &k);
  bool ex = false;
  for (int i = 1; i <= n; i++) {
    int a;
    scanf("%d", &a);
    if (a == k) ex = true;
    if (a < k)
      A[i] = -1;
    else
      A[i] = 1;
  }
  if (n == 1) {
    if (ex)
      puts("yes");
    else
      puts("no");
    return;
  }
  bool res = false;
  int r = 0, l = 0;
  for (int i = 1; i <= n; i++) {
    r += A[i];
    l++;
    if (r < 0) r = 0, l = 0;
    if (r > 0 && l > 1) res |= true;
  }
  if (res && ex)
    puts("yes");
  else
    puts("no");
}
