#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, k;
    cin >> n >> k;
    long long int f = 0;
    long long int a[n + 5];
    memset(a, -1, sizeof a);
    for (long long int x = 0; x < n; x++) {
      cin >> a[x];
    }
    if (a[0] == k && n == 1) {
      cout << "yes\n";
      continue;
    }
    long long int f1 = 0;
    for (long long int x = 0; x < n; x++) {
      if (a[x] == k) {
        f = 1;
      }
      if (a[x] >= k) {
        if (a[x + 1] >= k || a[x + 2] >= k) {
          f1 = 1;
        }
      }
    }
    if (f1 == 1 && f == 1) {
      cout << "yes\n";
    } else {
      cout << "no\n";
    }
  }
}
