#include <bits/stdc++.h>
const long long int mod = 1000000007;
const long long int AM = 2e5 + 5;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, k;
    cin >> n >> k;
    long long int a[n + 1], flag = 0;
    for (__typeof(0) i = 0; i < n; ++i) {
      cin >> a[i];
      if (a[i] == k) flag = 1;
      if (a[i] >= k)
        a[i] = 1;
      else
        a[i] = 0;
    }
    if (flag == 0) {
      cout << "no\n";
      continue;
    } else if (n == 1) {
      cout << "yes\n";
      continue;
    }
    long long int f1 = 0;
    for (__typeof(0) i = 0; i < n; ++i) {
      long long int sum = 0, sum1 = 0;
      for (long long int j = i; j < min(n, i + (long long int)3); j++)
        sum += a[j];
      for (long long int j = i; j > max(0, i - 3); j--) sum1 += a[j];
      if (sum >= 2 || sum1 >= 2) f1 = 1;
    }
    if (f1)
      cout << "yes\n";
    else
      cout << "no\n";
  }
}
