#include <bits/stdc++.h>
using namespace std;
int main() {
  std::ios::sync_with_stdio(false);
  int t;
  cin >> t;
  for (int testIter = 0; testIter < t; testIter++) {
    int n;
    long long k;
    cin >> n >> k;
    long long a[n];
    bool isTherek = false;
    bool isYes = false;
    if (n == 1) {
      isYes = true;
    }
    int bigcount = 0;
    for (int i = 0; i < n; i++) {
      cin >> a[i];
      if (a[i] == k) {
        isTherek = true;
      }
      if (a[i] >= k) {
        bigcount++;
      } else {
        bigcount = 0;
      }
      if (bigcount == 2) {
        isYes = true;
      }
    }
    if (isYes == false) {
      bigcount = 0;
      for (int i = 0; i < n; i = i + 2) {
        if (a[i] >= k) {
          bigcount++;
        } else {
          bigcount = 0;
        }
        if (bigcount == 2) {
          isYes = true;
        }
      }
      bigcount = 0;
      for (int i = 1; i < n; i = i + 2) {
        if (a[i] >= k) {
          bigcount++;
        } else {
          bigcount = 0;
        }
        if (bigcount == 2) {
          isYes = true;
        }
      }
    }
    if (isTherek == true && isYes == true) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
}
