#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("O1")
#pragma GCC optimize("O2")
#pragma GCC optimize("Os")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx2")
#pragma GCC optimization("unroll-loops")
long long int gcd(long long int a, long long int b) {
  return (b ? gcd(b, a % b) : a);
}
long long int P(long long int B, long long int power, long long int modulo) {
  long long int ans = 1LL;
  while (power > 0LL) {
    if (power % 2LL == 1LL) {
      ans = (ans * B) % modulo;
    }
    B = (B * B) % modulo;
    power /= 2LL;
  }
  return ans;
}
bool isPrime(long long int n) {
  if (n <= 1LL) {
    return false;
  }
  if (n <= 3LL) {
    return true;
  }
  if (n % 2 == 0LL || n % 3 == 0LL) {
    return false;
  }
  for (long long int i = 5LL; (i * i) <= n; i += 6LL) {
    if (n % i == 0LL || n % (i + 2LL) == 0LL) {
      return false;
    }
  }
  return true;
}
using namespace std;
void vok() {
  ios_base::sync_with_stdio(false);
  cout.tie(NULL);
  cin.tie(NULL);
}
const int mxN = int(1e5) + 100;
int dp[mxN];
bool vis[mxN];
void dfs(int u, vector<int> graph[]) {
  vis[u] = 1;
  for (auto x : graph[u]) {
    if (!vis[x]) {
      dfs(x, graph);
    }
    dp[u] = max(dp[u], dp[x] + 1);
  }
}
int main() {
  vok();
  int t;
  cin >> t;
  while (t--) {
    int n, k;
    cin >> n >> k;
    vector<int> v(n);
    set<int> index;
    for (int i = 0; i < n; i++) {
      cin >> v[i];
      if (v[i] == k) {
        index.insert(i);
      }
    }
    if (int(index.size()) == 0) {
      cout << "no"
           << "\n";
      continue;
    }
    bool flag = false;
    for (int i = 0; i < n - 1; i++) {
      if (v[i] >= k && v[i + 1] >= k) {
        flag = true;
        break;
      }
      if (i < n - 2) {
        if (v[i] >= k && v[i + 2] >= k) {
          flag = true;
          break;
        }
      }
    }
    if (flag || int(index.size()) == n || n == 1) {
      cout << "yes"
           << "\n";
      continue;
    }
    cout << "no"
         << "\n";
  }
  return 0;
}
