#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 1) + (x << 3) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
using namespace std;
const int maxn = 1e5 + 5;
long long arr[maxn];
int main() {
  int t = read();
  while (t--) {
    int n = read(), k = read(), f1 = 0, f2 = 0;
    for (int i = 1; i <= n; i++) {
      arr[i] = read();
      if (arr[i] == k) f1 = 1;
    }
    arr[n + 1] = arr[n + 2] = 0;
    for (int i = 1; i <= n; i++)
      if (arr[i] >= k && (arr[i + 1] >= k || arr[i + 2] >= k)) f2 = 1;
    if (n == 1) f2 = 1;
    if (f1 && f2)
      cout << "yes\n";
    else
      cout << "no\n";
  }
  return 0;
}
