#include <bits/stdc++.h>   using namespace std;   const long long N = 1e6 + 1e5, inf = 3e18, mod = 1e9 + 7;   long long tc, n, m, q, a, b, c, d, i, j, k;   long long A[N];   vector<long long> vec;   string s;   int main() {     ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);     cin >> tc;     while (tc--) {       cin >> n >> m;       long long flag1 = 0, flag2 = 0;       for (i = 2; i < n + 2; i++) {         cin >> A[i];         if (A[i] == m) flag1 = 1;         if (A[i] >= m && (A[i - 1] >= m || A[i - 2] >= m)) flag2 = 1;       }       if (flag1 && flag2 || (n == 1 && A[2] == m))         cout <<  yes n ;       else         cout <<  no n ;     }   }   