#include <bits/stdc++.h>
using namespace std;
long long T, n, x, a[55], b[55];
void into() {
  cin >> n >> x;
  for (long long i = 1; i <= n; ++i) cin >> a[i];
  for (long long i = 1; i <= n; ++i) cin >> b[i];
}
signed main() {
  cin >> T;
  while (T--) {
    into();
    bool f = 1;
    for (long long i = 1; i <= n; ++i)
      if (a[i] + b[n - i + 1] > x) {
        f = 0;
        break;
      }
    if (f == 1)
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
