#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int a[maxn];
int main() {
  ios::sync_with_stdio(false);
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    int ok = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == k)
        a[i] = 0, ok = 1;
      else if (a[i] < k)
        a[i] = -1;
      else
        a[i] = 1;
    }
    if (!ok) {
      cout << "no" << endl;
      continue;
    }
    if (n == 1) {
      cout << "yes" << endl;
      continue;
    }
    int flag = 0;
    for (int i = 1; i < n && !flag; i++) {
      if ((a[i] == 0 && a[i + 1] == 1) || (a[i] == 1 && a[i + 1] == 0) ||
          (a[i] == 0 && a[i + 1] == 0) || (a[i] == 1 && a[i + 1] == 1)) {
        flag = 1;
      }
    }
    if (flag) {
      cout << "yes" << endl;
      ;
      continue;
    }
    for (int i = 1; i < n - 1; i++) {
      string temp = to_string(a[i]) + to_string(a[i + 1]) + to_string(a[i + 2]);
      if (temp == "0-10" || temp == "1-10" || temp == "0-11" || temp == "1-11")
        flag = 1;
    }
    if (flag) {
      cout << "yes" << endl;
      ;
      continue;
    } else {
      cout << "no" << endl;
    }
  }
  return 0;
}
