#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k, p = 0;
    cin >> n >> k;
    vector<int> a(n);
    for (int &x : a) {
      cin >> x;
      if (x > k)
        x = 2;
      else if (x < k)
        x = 0;
      else
        x = 1;
      if (x == 1) p = 1;
    }
    if (!p) {
      cout << "no\n";
      continue;
    }
    if (n == 1) {
      cout << "yes\n";
      continue;
    }
    p = 0;
    for (int i = 0; i < n; i++) {
      if (a[i] && ((i && a[i - 1]) || (i > 1 && a[i - 2]))) p = 1;
    }
    cout << (p ? "yes" : "no") << "\n";
  }
}
