#include <bits/stdc++.h>
using namespace std;
using ll = long long;
void solve() {
  int l, r, d, u;
  int x, y, x1, y1, x2, y2;
  cin >> l >> r >> d >> u >> x >> y >> x1 >> y1 >> x2 >> y2;
  int sl = x - x1;
  int sr = x2 - x;
  int sd = y - y1;
  int su = y2 - y;
  if (sl < 0 || sr < 0 || sd < 0 || su < 0) {
    cout << "No\n";
    return;
  }
  if ((!su && !sd && (d || u)) || (!sl && !sr && (l || r))) {
    cout << "No\n";
    return;
  }
  int fx = x - l + r;
  int fy = y - d + u;
  if (fx < x1 || fx > x2 || fy < y1 || fy > y2) {
    cout << "No\n";
    return;
  }
  cout << "Yes\n";
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int t;
  cin >> t;
  while (t--) solve();
  return 0;
}
