#include <bits/stdc++.h>
#define int long long

using namespace std;

signed main() {
	ios::sync_with_stdio(false);
	cin.tie(NULL);

	int t;
	cin >> t;
	while(t--) {

		int c1, c2, c3;
		int a1, a2, x;

		cin >> c1 >> c2 >> c3;
		cin >> x; c1 -= x;
		cin >> x; c2 -= x;
		cin >> x; c3 -= x;
		cin >> a1 >> a2;

		if(min({c1, c2, c3}) < 0) {
			cout << "NO\n";
			continue;
		}

		int d;

		d = min(a1, c1);
		a1 -= d;
		c1 -= d;

		d = min(a1, c3);
		a1 -= d;
		c3 -= d;

		d = min(a2, c2);
		a2 -= d;
		c2 -= d;
		
		d = min(a2, c3);
		a2 -= d;
		c3 -= d;

		if(a1 or a2) cout << "NO\n";
		else cout << "YES\n";

	}

	return 0;
}