#include <bits/stdc++.h>   using namespace std;   long long xyp(long long x, long long y) {     if (y == 0) return 1LL;     if (y == 1) return x;     if (y % 2) {       long long p = xyp(x, y - 1);       return (x * p) % 1000000007;     }     long long p = xyp(x, y / 2);     return (p * p) % 1000000007;   }   long long inv(long long x) { return xyp(x, 1000000007 - 2); }   long long fact[10000007];   long long pr[10000007];   vector<long long> rp;   void init() {     fact[0] = 1;     for (long long i = 1; i < 10000007; i++) {       fact[i] = (fact[i - 1] * i) % 1000000007;     }   }   long long ncr(long long n, long long r) {     if (r < 0) return 0LL;     if (r == 0 || n == r) return 1LL;     if (r == 1 || ((n - r) == 1)) return n;     long long p =         (((fact[n] * inv(fact[r])) % 1000000007) * inv(fact[n - r])) % 1000000007;     return p;   }   void sieve() {     memset(pr, 1, sizeof(pr));     pr[0] = pr[1] = 0;     for (long long i = 2; i < 10000007; i++) {       if (pr[i]) {         rp.push_back(i);         for (long long j = i * i; j < 10000007; j += i) {           pr[j] = 0;         }       }     }   }   void solve() {     long long n, k;     cin >> n >> k;     long long a[n + 1], b[n + 1];     long long flag = 1;     for (long long i = 1; i <= n; i++) {       cin >> a[i];       b[i] = a[i];       if (a[i] == k) flag = 0;     }     if (flag) {       cout <<  no n ;       return;     }     sort(b + 1, b + n + 1);     if (b[(n + 1) / 2] == k) {       cout <<  yes n ;       return;     }     if (n == 1) {       if (a[1] == k)         cout <<  yes n ;       else         cout <<  no n ;       return;     }     if (n == 2) {       if (b[1] == k)         cout <<  yes n ;       else         cout <<  no n ;       return;     }     vector<long long> v;     for (long long i = 1; i <= n; i++) {       if (a[i] >= k) {         v.push_back(i);       }     }     flag = 0;     for (long long i = 0; i < v.size() - 1; i++) {       if ((v[i + 1] - v[i]) <= 2) {         flag = 1;       }     }     if (flag)       cout <<  yes n ;     else       cout <<  no n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     ;     int testcases;     cin >> testcases;     while (testcases--) {       solve();     }   }   