#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  cin.tie(0);
  cout.tie(0);
  ios::sync_with_stdio(false);
  int tc;
  cin >> tc;
  while (tc--) {
    int n, x;
    cin >> n >> x;
    int a[n];
    int b[n];
    for (int i = 0; i < n; ++i) cin >> a[i];
    for (int i = 0; i < n; ++i) cin >> b[i];
    bool flag = true;
    reverse(b, b + n);
    for (int i = 0; i < n; ++i) {
      if (a[i] + b[i] > x) {
        flag = false;
        break;
      }
    }
    if (flag)
      cout << "Yes\n";
    else
      cout << "No\n";
  }
  return 0;
}
