#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long temp;
  while (1) {
    if (b % a == 0) return a;
    temp = a;
    a = b % a;
    b = temp;
  }
}
int main() {
  long long n, m, p, q, c, i, x, j, t, k, sum = 0, cnt = 0, ans, res;
  cin >> t;
  while (t--) {
    cin >> n >> k;
    bool sure = false;
    c = 0;
    long long a[n + 1];
    for (i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == k) sure = true;
    }
    if (!sure)
      cout << "NO" << endl;
    else if (sure && n < 2)
      cout << "YES" << endl;
    else if (sure && n >= 2) {
      sure = false;
      for (i = 1; i < n; i++) {
        for (j = i + 1; j <= n && j - i <= 2; j++) {
          if (a[j] >= k && a[i] >= k) {
            cout << "YES" << endl;
            sure = true;
            break;
          } else
            sure = false;
        }
        if (sure) break;
      }
      if (!sure) cout << "NO" << endl;
    }
  }
  return 0;
}
