#include <bits/stdc++.h>
using namespace std;
int n, k, t;
int a[100005];
int main() {
  cin >> t;
  while (t--) {
    int flag = 1;
    scanf("%d%d", &n, &k);
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] < k)
        a[i] = 0;
      else if (a[i] == k) {
        a[i] = 1;
        flag = 0;
      } else
        a[i] = 2;
    }
    if (flag) {
      printf("no\n");
      continue;
    }
    if (n == 1) {
      printf("yes\n");
      continue;
    }
    int pre = -2;
    for (int i = 1; i <= n; i++) {
      if (a[i]) {
        if (i - pre <= 2) {
          printf("yes\n");
          flag = 1;
          break;
        }
        pre = i;
      }
    }
    if (!flag) printf("no\n");
  }
  return 0;
}
