#include <bits/stdc++.h>
using namespace std;
template <class T>
ostream& operator<<(ostream& cout, vector<T> V) {
  cout << "[ ";
  for (auto v : V) cout << v << ' ';
  return cout << ']';
}
template <class L, class R>
ostream& operator<<(ostream& cout, pair<L, R> P) {
  return cout << '(' << P.first << ',' << P.second << ')';
}
void solve() {
  long long int a, b, c, d, x, y, x1, y1, x2, y2;
  cin >> a >> b >> c >> d >> x >> y >> x1 >> y1 >> x2 >> y2;
  if ((x - a + b) <= x2 && (x - a + b) >= x1 && (y - c + d) <= y2 &&
      (y - c + d) >= y1) {
    if ((max(a, b) == 0 || (max(a, b) > 0 && (x2 - x1) > 0)) &&
        (max(c, d) == 0 || (max(c, d) > 0 && (y2 - y1) > 0)))
      cout << "Yes\n";
    else
      cout << "No\n";
  } else {
    cout << "No\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    solve();
  }
}
