#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1000006, maxm = 1005;
const long long mod = 1000000007;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long powermod(long long a, long long b) {
  a = a;
  long long ans = 1;
  while (b) {
    if (b % 2) ans = (ans * a);
    b = b / 2;
    a = (a * a);
  }
  return ans;
}
long long a[100005];
long long flag[100005];
int main() {
  long long t;
  scanf("%lld", &t);
  while (t--) {
    long long n, m, i, j, k;
    scanf("%lld%lld", &n, &k);
    long long vis1 = 0, vis2 = 0;
    for (i = 1; i <= n; i++) {
      scanf("%lld", &a[i]);
      if (a[i] == k) vis1 = 1;
      if (i >= 2) {
        if (a[i] >= k && (a[i - 1] >= k || a[i - 2] >= k)) vis2 = 1;
      }
    }
    if ((vis1 == 1 && vis2 == 1) || (n == 1 && vis1 == 1))
      printf("yes\n");
    else
      printf("no\n");
  }
}
