#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.F << ":" << m.S << ")";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e5 + 100;
int A[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(25);
  int t;
  cin >> t;
  while (t--) {
    set<int> s;
    int n, k;
    cin >> n >> k;
    int cnt = 0;
    int a = 0, b = 0, c = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> A[i];
      if (A[i] == k) ++cnt;
      if (A[i] == k)
        A[i] = 1, ++b;
      else if (A[i] < k)
        A[i] = 0, ++a;
      else
        A[i] = 2, ++c;
    }
    if (cnt == 0) {
      cout << "no"
           << "\n";
    } else {
      bool ok = false;
      for (int i = 1; i <= n - 2; ++i) {
        int z = 0;
        for (int j = 0; j < 3; ++j) z += (A[i + j] == 0);
        if (z < 2) {
          ok = true;
          break;
        }
      }
      int l = a + 1;
      int r = a + b;
      while (c >= 0) {
        if ((n + 1) / 2 >= l && (n + 1) / 2 <= r) {
          ok = true;
          break;
        }
        ++a;
        --c;
        l = a + 1;
        r = a + b;
      }
      if (ok) {
        cout << "yes"
             << "\n";
      } else {
        cout << "no"
             << "\n";
      }
    }
  }
  return 0;
}

### Prompt

Create a solution in Cpp for the following problem:

Slime has a sequence of positive integers a_1, a_2, …, a_n.

In one operation Orac can choose an arbitrary subsegment [l … r] of this sequence and replace all values a_l, a_{l + 1}, …, a_r to the value of median of \\{a_l, a_{l + 1}, …, a_r\}.

In this problem, for the integer multiset s, the median of s is equal to the ⌊ (|s|+1)/(2)⌋-th smallest number in it. For example, the median of \{1,4,4,6,5\} is 4, and the median of \{1,7,5,8\} is 5.

Slime wants Orac to make a_1 = a_2 = … = a_n = k using these operations.

Orac thinks that it is impossible, and he does not want to waste his time, so he decided to ask you if it is possible to satisfy the Slime's requirement, he may ask you these questions several times.

Input

The first line of the input is a single integer t: the number of queries.

The first line of each query contains two integers n\ (1≤ n≤ 100 000) and k\ (1≤ k≤ 10^9), the second line contains n positive integers a_1,a_2,...,a_n\ (1≤ a_i≤ 10^9)

The total sum of n is at most 100 000.

Output

The output should contain t lines. The i-th line should be equal to 'yes' if it is possible to make all integers k in some number of operations or 'no', otherwise. You can print each letter in lowercase or uppercase.

Example

Input


5
5 3
1 5 2 6 1
1 6
6
3 2
1 2 3
4 3
3 1 2 3
10 3
1 2 3 4 5 6 7 8 9 10


Output


no
yes
yes
no
yes

Note

In the first query, Orac can't turn all elements into 3.

In the second query, a_1=6 is already satisfied.

In the third query, Orac can select the complete array and turn all elements into 2.

In the fourth query, Orac can't turn all elements into 3.

In the fifth query, Orac can select [1,6] at first and then select [2,10].

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& os, vector<T> V) {
  os << "[ ";
  for (auto v : V) os << v << " ";
  return os << "]";
}
template <class T>
ostream& operator<<(ostream& os, set<T> S) {
  os << "{ ";
  for (auto s : S) os << s << " ";
  return os << "}";
}
template <class L, class R>
ostream& operator<<(ostream& os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
template <class L, class R>
ostream& operator<<(ostream& os, map<L, R> M) {
  os << "{ ";
  for (auto m : M) os << "(" << m.F << ":" << m.S << ")";
  return os << "}";
}
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cout << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = 1e5 + 100;
int A[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << fixed << setprecision(25);
  int t;
  cin >> t;
  while (t--) {
    set<int> s;
    int n, k;
    cin >> n >> k;
    int cnt = 0;
    int a = 0, b = 0, c = 0;
    for (int i = 1; i <= n; ++i) {
      cin >> A[i];
      if (A[i] == k) ++cnt;
      if (A[i] == k)
        A[i] = 1, ++b;
      else if (A[i] < k)
        A[i] = 0, ++a;
      else
        A[i] = 2, ++c;
    }
    if (cnt == 0) {
      cout << "no"
           << "\n";
    } else {
      bool ok = false;
      for (int i = 1; i <= n - 2; ++i) {
        int z = 0;
        for (int j = 0; j < 3; ++j) z += (A[i + j] == 0);
        if (z < 2) {
          ok = true;
          break;
        }
      }
      int l = a + 1;
      int r = a + b;
      while (c >= 0) {
        if ((n + 1) / 2 >= l && (n + 1) / 2 <= r) {
          ok = true;
          break;
        }
        ++a;
        --c;
        l = a + 1;
        r = a + b;
      }
      if (ok) {
        cout << "yes"
             << "\n";
      } else {
        cout << "no"
             << "\n";
      }
    }
  }
  return 0;
}

```