#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int a[n];
    vector<int> p1, p2;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] >= k) {
        p2.push_back(i);
        if (a[i] == k) {
          p1.push_back(i);
        }
      }
    }
    if (p1.size() == 0) {
      cout << "no" << endl;
      continue;
    }
    if (n == 1) {
      cout << "yes" << endl;
      continue;
    }
    bool flag = 0;
    for (int i = 1; i < p2.size(); i++) {
      if (p2[i] - p2[i - 1] <= 2) {
        flag = 1;
      }
    }
    if (flag) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
  return 0;
}
