#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    long long int x, y;
    cin >> x;
    cin >> y;
    vector<long long int> temp;
    int flag = 0;
    for (int i = 0; i < x; i++) {
      long long int we;
      cin >> we;
      temp.push_back(we);
      if (we == y) {
        flag = 1;
      }
    }
    if (flag == 0) {
      cout << "no" << endl;
      continue;
    }
    if (x == 1 && flag == 1) {
      cout << "yes" << endl;
      continue;
    }
    long long int ans = 0;
    for (int i = 0; i <= x - 3; i++) {
      long long int we = min(temp[i], temp[i + 1]);
      if (we >= y) {
        cout << "yes" << endl;
        ans = 1;
        break;
      }
      vector<long long int> er;
      er.push_back(temp[i]);
      er.push_back(temp[i + 1]);
      er.push_back(temp[i + 2]);
      sort(er.begin(), er.end());
      we = er[1];
      if (we >= y) {
        cout << "yes" << endl;
        ans = 1;
        break;
      }
    }
    if (ans == 1) {
      continue;
    } else {
      long long int we = min(temp[x - 2], temp[x - 1]);
      if (we >= y) {
        cout << "yes" << endl;
        ans = 1;
      }
    }
    if (ans == 0) {
      cout << "no" << endl;
    }
  }
  return 0;
}
