#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using pii = pair<int, int>;
constexpr int N = 5e2 + 5;
int t;
int a, b, c, d, x, y, xx, yy, x2, y2;
bool check(int l, int r, int cur, int cl, int cr) {
  if ((l || r) && cur == cl && cur == cr) return 0;
  if (r > l)
    return cur + (r - l) <= cr;
  else
    return cur - (l - r) >= cl;
}
void Solve() {
  cin >> a >> b >> c >> d >> x >> y >> xx >> yy >> x2 >> y2;
  cout << (check(a, b, x, xx, x2) && check(c, d, y, yy, y2) ? "Yes" : "No")
       << "\n";
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  cin >> t;
  while (t--) Solve();
  return 0;
}
