#include <bits/stdc++.h>
using namespace std;
long long T, a, b, c, d, x, y, l, r, L, R;
bool rua(long long a, long long b, long long x, long long l, long long r) {
  if (a + b == 0) return true;
  if (x == l && l == r) return false;
  return l <= x - a + b && x - a + b <= r;
}
int main() {
  scanf("%lld", &T);
  while (T--) {
    scanf("%lld%lld%lld%lld", &a, &b, &c, &d);
    scanf("%lld%lld%lld%lld%lld%lld", &x, &y, &l, &L, &r, &R);
    printf("%s\n", (rua(a, b, x, l, r) && rua(c, d, y, L, R)) ? "Yes" : "No");
  }
}
