#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 5;
int t, n, k, m, a[maxn];
bool f1, f2;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> t;
  while (t--) {
    cin >> n >> k;
    f1 = f2 = a[n + 1] = 0;
    for (int i = 1; i <= n; i++) cin >> a[i];
    for (int i = 1; i <= n; i++) a[i] = a[i] > k ? 2 : a[i] == k;
    if (n == 1)
      f1 = f2 = a[1] == 1;
    else if (n == 2)
      f1 = f2 = a[1] && a[2] && a[1] + a[2] < 4;
    else {
      for (int i = 1; i <= n; i++) f1 = f1 || a[i] == 1;
      for (int i = 1; i + 1 <= n; i++)
        f2 = f2 || a[i] && a[i + 1] || a[i] && a[i + 2];
    }
    cout << (f1 && f2 ? "yes" : "no") << '\n';
  }
}
