#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long int llINF = 0x3f3f3f3f3f3f3f;
int main() {
  int t;
  scanf("%d", &t);
  while (t--) {
    int n, k;
    scanf("%d%d", &n, &k);
    int last[2] = {-1, -1};
    bool deu = false, achou = false;
    for (int i = 0; i < n; i++) {
      int a;
      scanf("%d", &a);
      if (n == 1) {
        if (a == k)
          printf("yes\n");
        else
          printf("no\n");
        goto END;
      }
      if (a == k) achou = true;
      if (last[0] != -1) {
        if (last[1] != -1 && last[1] >= k && a >= k) deu = true;
        if (a >= k && last[0] >= k) deu = true;
      }
      swap(last[0], last[1]);
      last[0] = a;
    }
    if (deu && achou)
      printf("yes\n");
    else
      printf("no\n");
  END:;
  }
}
