#include <bits/stdc++.h>
using namespace std;
int a[100005];
int b[100005];
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, k;
    cin >> n >> k;
    int ans = 0;
    for (int i = (0), _ = (n); i < _; i++) {
      cin >> a[i];
      a[i] = (a[i] > k) - (a[i] < k);
    }
    for (int i = (0), _ = (n - 2); i < _; i++)
      if (a[i] == 1 && a[i + 2] == 1 && a[i + 1] == -1) a[i + 1] = 1;
    for (int i = (0), _ = (n - 2); i < _; i++)
      if (a[i] == 1 && a[i + 1] == 1 && a[i + 2] == -1) a[i + 2] = 1;
    for (int i = (n - 2) - 1, _ = (0); i >= _; i--)
      if (a[i] == -1 && a[i + 1] == 1 && a[i + 2] == 1) a[i] = 1;
    for (int i = (0), _ = (n - 1); i < _; i++) {
      if (a[i] + a[i + 1] == 1) ans = 1;
      if (a[i] == 0 && a[i + 1] == 0) ans = 1;
    }
    for (int i = (0), _ = (n - 2); i < _; i++) {
      if (a[i + 1] == -1 && a[i] + a[i + 2] == 1) ans = 1;
      if (a[i + 1] == -1 && a[i] == 0 && a[i + 2] == 0) ans = 1;
    }
    if (n == 1 && a[0] == 0) ans = 1;
    cout << (ans ? "yes" : "no") << endl;
  }
  return 0;
}
