#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) {
    return b;
  }
  return gcd(b % a, a);
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long q;
  cin >> q;
  for (long long t = 0; t < q; ++t) {
    long long n, k;
    cin >> n >> k;
    vector<long long> a;
    bool che = 0;
    for (long long i = 0; i < n; ++i) {
      long long x;
      cin >> x;
      if (x == k) {
        a.push_back(0);
        che = 1;
      }
      if (x < k) {
        a.push_back(-1);
      }
      if (x > k) {
        a.push_back(1);
      }
    }
    if (!che) {
      cout << "no\n";
    } else {
      if (n == 1) {
        cout << "yes\n";
      } else {
        bool e = 0;
        for (long long i = 0; i < n; ++i) {
          for (long long j = i + 1; j < n && j - i <= 2; ++j) {
            if (a[i] >= 0 && a[j] >= 0) {
              cout << "yes\n";
              e = 1;
              break;
            }
          }
          if (e) {
            break;
          }
        }
        if (!e) {
          cout << "no\n";
        }
      }
    }
  }
}
