#include <bits/stdc++.h>
using namespace std;
int power(long long int x, long long int y, long long int m) {
  if (y == 0) return 1;
  long long int p = power(x, y / 2, m) % m;
  p = (p * p) % m;
  return (y % 2 == 0) ? p : (x * p) % m;
}
int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
pair<long long int, long long int> fib(long long int n) {
  if (n == 0) return {0, 1};
  auto p = fib(n >> 1);
  int c = p.first * (2 * p.second - p.first);
  int d = p.first * p.first + p.second * p.second;
  if (n & 1)
    return {d, c + d};
  else
    return {c, d};
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int t = 1;
  cin >> t;
  while (t--) {
    long long int n, k;
    cin >> n >> k;
    int arr[n + 2];
    arr[n] = 0;
    arr[n + 1] = 0;
    int flag = 0, f2 = 0;
    for (int i = 0; i < n; i++) {
      long long int gg;
      cin >> gg;
      if (gg == k) flag = 1;
      if (gg >= k)
        arr[i] = 1;
      else {
        arr[i] = 0;
      }
    }
    for (int i = 0; i < n; i++) {
      long long int s = 0;
      for (int j = 0; j < 3; j++) {
        s += arr[i + j];
      }
      if (s >= 2) {
        f2 = 1;
        break;
      }
    }
    if ((f2 == 1 || n == 1) and flag == 1) {
      cout << "yes\n";
    } else {
      cout << "no\n";
    }
  }
}
