#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 2e5 + 10;
int a[N];
int main() {
  int ncase;
  scanf("%d", &ncase);
  while (ncase--) {
    int n, k;
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
    if (n == 1) {
      if (a[1] == k)
        puts("yes");
      else
        puts("no");
      continue;
    }
    int ok = 0;
    int cur = 0;
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (a[i] == k && cur == 0 && cnt > 0) ok = 1;
      if (a[i] == k && cur > 0) ok = 1;
      if (cur == 0 && cnt > 0 && a[i] >= k) cur = INF;
      if (a[i] >= k)
        cur++;
      else
        cur--;
      cnt++;
      if (cur < 0) cur = 0, cnt = 0;
      if (cur > 1) cur = INF;
    }
    cur = 0;
    cnt = 0;
    for (int i = n; i >= 1; i--) {
      if (a[i] == k && cur == 0 && cnt > 0) ok = 1;
      if (a[i] == k && cur > 0) ok = 1;
      if (cur == 0 && cnt > 0 && a[i] >= k) cur = INF;
      if (a[i] >= k)
        cur++;
      else
        cur--;
      cnt++;
      if (cur < 0) cur = 0, cnt = 0;
      if (cur > 1) cur = INF;
    }
    if (ok)
      puts("yes");
    else
      puts("no");
  }
  return 0;
}
