#include <bits/stdc++.h>
using namespace std;
long long int min(long long int a, long long int b) { return a < b ? a : b; }
long long int min(long long int a, long long int b, long long int c) {
  a = min(a, b);
  a = min(a, c);
  return a;
}
long long int max(long long int a, long long int b) { return a > b ? a : b; }
long long int max(long long int a, long long int b, long long int c) {
  a = max(a, b);
  a = max(a, c);
  return a;
}
long long int dsum(long long int n) {
  long long int ans = 0;
  while (n) {
    ans += (n % 10);
    n /= 10;
  }
  return ans;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
struct pll {
  long long int x, y;
};
bool comp(pll a, pll b) {
  if (a.x == b.x)
    return a.y < b.y;
  else
    return a.x < b.x;
}
void solve(long long int the) {
  char ch;
  double aa, bb, cc, dd, xx;
  string s1, s2, s3, str;
  long long int i, j, k, a, b, c, d, n, m, l, r, x, y, z, low, high, mid,
      sum = 0, ans = 0, temp, t;
  cin >> n >> k;
  long long int arr[n];
  bool ok = false;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
    if (arr[i] == k) ok = true;
  }
  if (!ok) {
    cout << "no" << endl;
    return;
  }
  if (n == 1 && arr[0] == k) {
    cout << "yes" << endl;
    return;
  }
  for (i = 1; i < n; i++) {
    if (arr[i] >= k && arr[i - 1] >= k) {
      cout << "yes" << endl;
      return;
    }
  }
  for (i = 0; i < n - 2; i++) {
    a = 0;
    if (arr[i] >= k) a++;
    if (arr[i + 1] >= k) a++;
    if (arr[i + 2] >= k) a++;
    if (a >= 2) {
      cout << "yes" << endl;
      return;
    }
  }
  cout << "no" << endl;
}
int main() {
  long long int t = 1, c = 1;
  scanf("%lld", &t);
  while (t--) {
    solve(c);
    c++;
  }
  return 0;
}
