#include<bits/stdc++.h>
using namespace std;
int main() {
	int veces;
	cin>>veces;
	int cta = 1;
	while(veces--){
		int a , b , c;
		int i , k , l;
		i = k = l = 0;
		cin>>a>>b>>c;
		int  y , w , z , x, p;
		cin>>x>>y>>w>>z>>p;
		if( x > a || y > b || c < w){
			cout<<"NO"<<endl;
			continue;
		}
		i += x , k += y, l += w ;
		int d = a - i;
		if( d >=  z ) {
			z = 0;
		}else{
			z -= d;
			d = c - l;
			if ( d>= z){
				l += z;
			}else{
				cout<<"NO"<<endl;
				continue;
			}
		}
		d = b - k;
		if( d >= p){
			cout<<"YES"<<endl;	
		}else{
			p -= d;
			d = c - l;
			if( d >= p){
				cout<<"Yes"<<endl;
			}else{
				cout<<"no"<<endl;
			}
		}
		
	}
}
