#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, solve, arr[100005], test;
  cin >> test;
  while (test--) {
    cin >> n >> k;
    solve = 0;
    for (int i = 0; i < n; i++) {
      cin >> a;
      if (a == k) {
        solve = 1;
      }
      if (a >= k) {
        arr[i] = 1;
      } else
        arr[i] = 0;
    }
    if (!solve) {
      cout << "no" << endl;
      continue;
    }
    arr[n] = 0, arr[n + 1] = 0;
    for (int i = 0; i < n; i++) {
      if (arr[i] & (arr[i + 1] | arr[i + 2])) {
        solve = 0;
      }
    }
    if (n == 1 && arr[0]) {
      solve = 0;
    }
    if (!solve)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
