#include <bits/stdc++.h>
using namespace std;
;
int main() {
  long long int t;
  cin >> t;
  while (t--) {
    long long int n, x, f = 0;
    cin >> n >> x;
    long long int ar[n], br[n];
    for (long long int i = 0; i < n; i++) cin >> ar[i];
    for (long long int i = 0; i < n; i++) cin >> br[i];
    reverse(br, br + n);
    for (long long int i = 0; i < n; i++) {
      if (ar[i] + br[i] > x) {
        cout << "No" << endl;
        f = 1;
        break;
      }
    }
    if (f == 0) cout << "Yes" << endl;
  }
  return 0;
}
