#include <bits/stdc++.h>
using namespace std;
const int mai = 100010;
int dp[mai];
int temp[mai];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    int t, k;
    scanf("%d%d", &t, &k);
    int flag = 0;
    for (int z = 1; z <= t; z++) {
      scanf("%d", &temp[z]);
      if (temp[z] == k) flag = 1;
    }
    if (!flag) {
      printf("no\n");
      continue;
    }
    if (flag == 1 && t == 1) {
      printf("yes\n");
      continue;
    }
    flag = 0;
    for (int z = 1; z < t; z++) {
      if (temp[z] >= k) {
        if (temp[z + 1] >= k || (temp[z + 2] >= k && z + 2 <= t)) {
          flag = 1;
          break;
        }
      }
    }
    if (k == 1) {
      printf("yes\n");
      continue;
    }
    if (flag == 1) {
      printf("yes\n");
    } else
      printf("no\n");
  }
}
