#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int a[N];
int T, n, k;
int main() {
  scanf("%d", &T);
  while (T--) {
    scanf("%d%d", &n, &k);
    int pd1 = 0, pd2 = 0, pd3 = 0;
    for (int i = 1; i <= n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == k) {
        a[i] = 0;
        pd1 = 1;
      } else if (a[i] < k) {
        a[i] = -1;
        pd2 = 1;
      } else {
        a[i] = 1;
        pd3 = 1;
      }
    }
    if (pd1 == 0) {
      printf("no\n");
      continue;
    }
    if (pd2 == 0) {
      printf("yes\n");
      continue;
    }
    a[n + 1] = -1;
    bool pd = 0;
    int temp1 = 0, temp2 = 0;
    for (int i = 1; i <= n + 1; i++) {
      if (a[i] == -1) {
        if (temp1 + temp2 >= 2) {
          pd = 1;
          break;
        } else {
          temp1 = temp2;
          temp2 = 0;
        }
      } else {
        temp2++;
      }
    }
    if (pd) {
      printf("yes\n");
    } else {
      printf("no\n");
    }
  }
  return 0;
}
