#include <bits/stdc++.h>
using namespace std;
const long long mod = 998244353;
bool prime[1000001];
long long f[300001];
long long pow1(long long x, long long y) {
  long long res = 1;
  x = x % mod;
  if (x == 0) return 0;
  while (y > 0) {
    if (y & 1) res = (res * x) % mod;
    y = y >> 1;
    x = (x * x) % mod;
  }
  return res;
}
long long divide(long long n) { return pow1(n, mod - 2); }
long long ncr(long long n, long long r) {
  if (n < r) return 0;
  return (f[n] * ((divide(f[r]) * divide(f[n - r])) % mod)) % mod;
}
void sieve() {
  memset(prime, true, sizeof(prime));
  for (long long i = 2; i * i <= 1000000; i++)
    if (prime[i])
      for (long long j = i * i; j <= 1000000; j += i) prime[j] = false;
  prime[0] = prime[1] = false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  cin >> t;
  while (t--) {
    long long n, x, i, ans = 0;
    cin >> n >> x;
    long long a[n + 1], b[n + 1];
    for (i = 1; i <= n; i++) cin >> a[i];
    for (i = 1; i <= n; i++) {
      cin >> b[i];
      if (b[i] + a[n + 1 - i] > x) ans = -1;
    }
    if (ans == -1)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
  return 0;
}
