#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t > 0) {
    t--;
    int n, x;
    cin >> n >> x;
    int a[n], b[n];
    for (int i = 0; i < n; i++) {
      cin >> a[i];
    }
    for (int i = 0; i < n; i++) {
      cin >> b[i];
    }
    int flag = 0, i, j;
    for (i = 0, j = n - 1; i < n, j >= 0; i++, j--) {
      if (a[i] + b[j] > x) {
        cout << "No\n";
        flag = 1;
        break;
      }
    }
    if (flag == 0) cout << "Yes\n";
  }
}
