#include <bits/stdc++.h>
using namespace std;
int t, n, k;
int const maxn = 1e5 + 10;
vector<int> ans;
int main() {
  cin >> t;
  for (int i = 0; i < t; i++) {
    cin >> n >> k;
    ans.clear();
    int len = 0;
    for (int j = 0; j < n; j++) {
      int x;
      cin >> x;
      if (x == k) len = 1;
      if (x >= k)
        ans.push_back(1);
      else
        ans.push_back(-1);
    }
    bool tdapan = false;
    if (len == 0) {
      cout << "no" << endl;
      tdapan = true;
    } else {
      if (n <= 2) {
        int sum = 0;
        for (int j = 0; j < n; j++) {
          sum += ans[j];
        }
        if (sum > 0)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      } else {
        for (int j = 1; j < n - 1; j++) {
          if (ans[j - 1] + ans[j] + ans[j + 1] > 0) {
            tdapan = true;
            break;
          }
        }
        if (tdapan)
          cout << "yes" << endl;
        else
          cout << "no" << endl;
      }
    }
  }
  return 0;
}
