#include <bits/stdc++.h>
using namespace std;
int main() {
  int t, n, k, a[100000 + 3];
  scanf("%d", &t);
  for (int cases = 1; cases <= t; cases++) {
    scanf("%d%d", &n, &k);
    bool kExist = false;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == k) kExist = true;
    }
    if (!kExist) {
      printf("no\n");
      continue;
    }
    if (n == 1) {
      printf("yes\n");
      continue;
    }
    int lastLargerOrEqual = -1;
    bool possible = false;
    for (int i = 1; i <= n; i++) {
      if (a[i] >= k) {
        if (lastLargerOrEqual != -1 && i - lastLargerOrEqual <= 2)
          possible = true;
        lastLargerOrEqual = i;
      }
    }
    if (possible)
      printf("yes\n");
    else
      printf("no\n");
  }
}
