#include <bits/stdc++.h>
using namespace std;
const int maxm = 1e5 + 5;
int a[maxm];
signed main() {
  int T;
  cin >> T;
  while (T--) {
    int n, k;
    cin >> n >> k;
    int has = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] < k)
        a[i] = 0;
      else if (a[i] == k)
        a[i] = 1, has = 1;
      else
        a[i] = 2;
    }
    if (!has) {
      puts("no");
      continue;
    }
    if (n == 1) {
      if (a[1] == 1)
        puts("yes");
      else
        puts("no");
      continue;
    }
    int ok = 0;
    int last = -111;
    for (int i = 1; i <= n && !ok; i++) {
      if (a[i]) {
        if (i - last <= 2) ok = 1;
        last = i;
      }
    }
    if (ok)
      puts("yes");
    else
      puts("no");
  }
  return 0;
}
