#include <bits/stdc++.h>
using namespace std;
bool isPrime(long long int n) {
  if (n <= 1) return false;
  if (n <= 3) return true;
  if (n % 2 == 0 || n % 3 == 0) return false;
  for (long long int i = 5; i * i <= n; i = i + 6)
    if (n % i == 0 || n % (i + 2) == 0) return false;
  return true;
}
long long int largest_power(long long int N) {
  N = N | (N >> 1);
  N = N | (N >> 2);
  N = N | (N >> 4);
  N = N | (N >> 8);
  return (N + 1) >> 1;
}
bool sortbysec(const pair<long long int, long long int> &a,
               const pair<long long int, long long int> &b) {
  return (a.second < b.second);
}
long long int binpow(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long int binpowm(long long int a, long long int b, long long int m) {
  a %= m;
  long long int res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long int spf[100001];
void sieve() {
  spf[1] = 1;
  for (long long int i = 2; i < 100001; i++) spf[i] = i;
  for (long long int i = 4; i < 100001; i += 2) spf[i] = 2;
  for (long long int i = 3; i * i < 100001; i++) {
    if (spf[i] == i) {
      for (long long int j = i * i; j < 100001; j += i) {
        if (spf[j] == j) spf[j] = i;
      }
    }
  }
}
vector<long long int> getFactorization(long long int x) {
  vector<long long int> ret;
  while (x != 1) {
    ret.push_back(spf[x]);
    x = x / spf[x];
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t;
  cin >> t;
  while (t--) {
    long long int a, b;
    cin >> a >> b;
    long long int c, d;
    cin >> c >> d;
    long long int x, y;
    cin >> x >> y;
    long long int x1, y1;
    cin >> x1 >> y1;
    long long int x2, y2;
    cin >> x2 >> y2;
    x += -a + b;
    y += -c + d;
    if (x >= x1 && x <= x2 && y >= y1 && y <= y2 && (x2 > x1 || a + b == 0) &&
        (y2 > y1 || c + d == 0)) {
      cout << "Yes" << endl;
    } else {
      cout << "No" << endl;
    }
  }
  return 0;
}
