#include <bits/stdc++.h>
using namespace std;
bool isPrime(int x) {
  if (x == 1) return false;
  for (long long i = 2; i <= sqrt(x); i += 1)
    if (x % i == 0) return false;
  return true;
}
void print(int a[], int n) {
  for (long long i = 0; i < n; i += 1) cout << a[i] << " ";
}
void iarr(int *a, int n) {
  for (long long i = 0; i < n; i += 1) cin >> a[i];
}
long long power(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = ((res % 1000000007) * (a % 1000000007)) % 1000000007;
    a = ((a % 1000000007) * (a % 1000000007)) % 1000000007;
    b >>= 1;
  }
  return res;
}
long long numFactors(long long x) {
  long long cnt = 0;
  for (long long i = 1; i <= sqrt(x); i += 1) {
    if (x % i == 0) {
      if (x / i == i)
        cnt += 1;
      else
        cnt += 2;
    }
  }
  return cnt;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int t;
  cin >> t;
  while (t--) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    int x, y, x1, y1, x2, y2;
    cin >> x >> y >> x1 >> y1 >> x2 >> y2;
    int diff1 = x - a + b;
    int diff2 = y - c + d;
    if ((x1 <= diff1) && (diff1 <= x2) && (y1 <= diff2) && (diff2 <= y2) &&
        (a + b == 0 || x2 > x1) && (c + d == 0 || y2 > y1)) {
      cout << "yes\n";
    } else
      cout << "no"
           << "\n";
  }
  return 0;
}
