// problem: http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=GRL_3_A
// require: graph/articulation_points.d

import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

//LRDU

bool solve2(int a, int b, int x1, int x2) {
    if (x1 == 0 && x2 == 0) {
        return a == 0 && b == 0;
    } else if (a == b) {
        return true;
    } else if (a > b) {
        return abs(x1) >= a - b;
    } else {
        return abs(x2) >= b - a;
    }
}

void solve(int T) {
    while (T--) {
        auto s = readln.split.map!(to!int);
        auto A = s[0];
        auto B = s[1];
        auto C = s[2];
        auto D = s[3];
        s = readln.split.map!(to!int);
        auto X = s[0];
        auto Y = s[1];
        auto x1 = s[2] - X;
        auto y1 = s[3] - Y;
        auto x2 = s[4] - X;
        auto y2 = s[5] - Y;
        auto AB = A - B;
        auto ans = solve2(A, B, x1, x2) && solve2(C, D, y1, y2);
        writeln(ans ? "Yes" : "No");
    }
}

void main() {
    auto T = readln.chomp.to!int;
    solve(T);
}
