#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4")
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
template <typename T>
T gcd(T a, T b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long power(long long a, long long b, long long m = 1000000007) {
  long long answer = 1;
  while (b) {
    if (b & 1) answer = (answer * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return answer;
}
using namespace std;
void ctrl() { cout << "Control" << endl; }
long long make_num(string p) {
  stringstream geek(p);
  long long x = 0;
  geek >> x;
  return x;
}
string make_str(long long x) {
  ostringstream str1;
  str1 << x;
  string geek = str1.str();
  return geek;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin.exceptions(cin.failbit);
  long long tc;
  cin >> tc;
  for (long long t = 1; t <= tc; t++) {
    long long n, k;
    cin >> n >> k;
    long long A[n];
    long long same = 0;
    bool flag = false;
    vector<long long> v;
    for (long long i = 0; i < n; i++) {
      cin >> A[i];
      if (A[i] == k) same++;
      if (A[i] >= k) v.push_back(i);
    }
    for (long long i = 1; i < v.size(); i++)
      if (v[i] - v[i - 1] <= 2) flag = true;
    if ((flag && same) || same == n)
      cout << "yes\n";
    else
      cout << "no\n";
  }
  return 0;
}
