#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2e9 + 5;
const int MAXN = 100010;
int t, n, k, a[MAXN];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    bool invalid = true;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] < k) {
        a[i] = -1;
      } else if (a[i] == k) {
        a[i] = 0;
        invalid = false;
      } else {
        a[i] = 1;
      }
    }
    if (invalid) {
      cout << "no\n";
      continue;
    }
    bool possible = n == 1;
    for (int i = 0; i < n - 1; i++) {
      if (a[i] >= 0 && a[i + 1] >= 0) {
        possible = true;
      }
    }
    for (int i = 0; i < n - 2; i++) {
      if (a[i] >= 0 && a[i + 2] >= 0) {
        possible = true;
      }
    }
    if (possible) {
      cout << "yes\n";
    } else {
      cout << "no\n";
    }
  }
}
