#include <bits/stdc++.h>
using namespace std;
int dp[1000][1000];
long long int mpow(long long int base, long long int exp);
void ipgraph(int m);
void dfs(int u, int par);
const int N = 130, M = N;
vector<long long int> g[N];
int a[N][N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    long long int a = 0, b = 0, c = 0, d = 0, e = 0, p = 0, q = 0, r = 0;
    long long int ans = 0, res = 0, cnt = 0, sum = 0, diff = 0, mul = 1;
    string s;
    long long int n, k;
    cin >> n;
    cin >> k;
    long long int arr[n + 1], brr[n + 1];
    map<long long int, long long int> mp;
    for (long long int i = 0; i < n; i++) {
      cin >> arr[i];
      mp[arr[i]]++;
    }
    if (n == 1 && arr[0] == k) {
      cout << "yes" << '\n';
      continue;
    } else if (n == 1) {
      cout << "no" << '\n';
      continue;
    }
    if (mp[k] >= 1) {
      long long int flag = 0;
      for (long long int i = 0; i < n; i++) {
        if ((i + 1) < n && arr[i] >= k && arr[i + 1] >= k) {
          flag = 1;
          break;
        } else if ((i + 2) < n && arr[i] >= k && arr[i + 2] >= k) {
          flag = 1;
          break;
        }
      }
      if (flag)
        cout << "yes" << '\n';
      else
        cout << "no" << '\n';
    } else
      cout << "no" << '\n';
  }
  return 0;
}
