#include <bits/stdc++.h>
using namespace std;
int T, n, K, sum[500000], a[500000];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> T;
  while (T--) {
    cin >> n >> K;
    bool flag = 0;
    for (int i = 1; i <= n; i++) {
      cin >> a[i];
      if (a[i] == K) flag = 1;
    }
    if (!flag) {
      cout << "no" << endl;
      continue;
    }
    if (n == 1) {
      cout << "yes" << endl;
      continue;
    }
    for (int i = 1; i <= n; i++) sum[i] = sum[i - 1] + (a[i] >= K);
    if (n == 2) {
      if (sum[2] == 2)
        cout << "yes" << endl;
      else
        cout << "no" << endl;
      continue;
    }
    flag = 0;
    for (int i = 1; i <= n - 2; i++)
      if (sum[i + 2] - sum[i - 1] >= 2) {
        flag = 1;
        break;
      }
    if (flag)
      cout << "yes" << endl;
    else
      cout << "no" << endl;
  }
  return 0;
}
