Problem: The progress is not standing still in Berland. Recently all garbage containers in Bertown, the capital of Berland, were replaced by differentiated recycling bins, each accepting some category of waste. While this will definitely improve the ecological situation, for some citizens it's difficult to get used to the habit of sorting waste.

Monocarp is one of those citizens who tries to get used to waste sorting. Today he has to take out the trash from his house. There are three containers near the Monocarp's house, the first one accepts paper waste, the second one accepts plastic waste, and the third one — all other types of waste. It is possible to fit c_1 items into the first container, c_2 items into the second container and c_3 items into the third container.

Monocarp has a lot of items to throw into containers. Some are made of paper, so Monocarp has to put them into the first container (he has a_1 such items), some are made of plastic, so he has to put them into the second container (he has a_2 such items), and some are neither paper nor plastic — so Monocarp has to put them into the third container (he has a_3 such items).

Unfortunately, there are also two categories of items that Monocarp is unsure of: he has a_4 items which are partially made of paper, so he will put each of these items either into the first container or into the third container. Similarly, he has a_5 items partially made of plastic, so he has to put each of them either into the second container or into the third container. Obviously, this choice is made separately for each item — for example, Monocarp can throw several partially-plastic items into the second container, and all other partially-plastic items — into the third one.

Now Monocarp wonders: is it possible to put each item into some container so that the first container will hold no more than c_1 items, the second one — no more than c_2 items, and the third one — no more than c_3 items?

Input

The first line contains one integer t (1 ≤ t ≤ 3 ⋅ 10^4) — the number of test cases. 

Each test case consists of two lines. The first line of each test case contains three integers c_1, c_2, c_3 (0 ≤ c_1, c_2, c_3 ≤ 10^8) — the capacities of the containers. 

The second line of each test case contains five integers a_1, a_2, a_3, a_4, a_5 (0 ≤ a_i ≤ 10^8), where a_i is the number of items of the i-th category Monocarp has to throw out (i = 1 is paper waste, i = 2 is plastic waste, i = 3 is general waste, i = 4 is partially-paper waste, i = 5 is partially-plastic waste).

Output

For each test case, print either YES if it is possible to fit all items into containers, or NO otherwise. You may print each letter in any case (for example, YES, Yes, yes, yEs will all be recognized as positive answer).

Example

Input


7
1 2 3
1 2 3 0 0
2 2 3
1 2 3 1 0
2 2 3
1 2 3 0 1
1 2 5
1 2 3 1 1
0 0 0
0 0 0 0 0
0 0 4
1 0 0 0 0
13 37 42
0 0 0 40 47


Output


YES
YES
NO
YES
YES
NO
YES

Note

Explanations for the example test cases:

  1. Monocarp can put 1 item of paper waste into the first container, 2 items of plastic waste into the second container, and 3 items of general waste into the third container; 
  2. Monocarp can put 1 item of paper waste and 1 item of partially-paper waste into the first container, 2 items of plastic waste into the second container, and 3 items of general waste into the third container; 
  3. there is no answer since either the second container should contain 3 items, or the third container should contain 4 items; 
  4. Monocarp can put 1 item of paper waste into the first container, 2 items of plastic waste into the second container, and 3 items of general waste, 1 item of partially-paper waste and 1 item of partially-plastic waste into the third container; 
  5. there is no waste at all, so all containers can be left empty; 
  6. there's no answer since it's impossible to put a paper item into the third container; 
  7. Monocarp can put 10 items of partially-paper waste into the first container, 37 items of partially-plastic waste into the second container, and 30 items of partially-paper waste and 10 items of partially-plastic waste into the third container. 

Solution (in CPP):

Solution:

/*
2300 codechef rating before 31 December 2020
*/
/*
2100 codeforces rating before 31 December 2020
*/




#include <bits/stdc++.h>
using namespace std;

typedef long double LD;
typedef long long ll;
#define int ll
#define itn int
#define pb push_back
#define mpp make_pair
#define REP(i,n) for (int i = 0; i < n; i++)
#define FOR(i,a,b) for (int i = a; i < b; i++)
#define REPD(i,n) for (int i = n-1; i >= 0; i--)
#define FORD(i,a,b) for (int i = a; i >= b; i--)
#define remax(a,b) a = max(a,b)
#define remin(a,b) a = min(a,b)
#define all(v) v.begin(),v.end()
#define rev(v) v.begin(),v.end(),greater<int>()
typedef map<int,int> mii;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
typedef vector<pii> vpii;
#define ff first
#define ss second
#define go(it,c) for(auto it=(c).begin(); it!=(c).end(); it++)
#define pq(type) priority_queue<type>
#define PQD(type) priority_queue<type,vector<type>,greater<type> >
#define wt(t) while(t --)
#define SZ(x) ((int)(x).size())
#define runtime() ((double)clock() / CLOCKS_PER_SEC)
#define inrange(i,a,b) ((i>=min(a,b)) && (i<=max(a,b)))
#define FAST_IO ios_base::sync_with_stdio(false);cin.tie(NULL);
const int MAXN = 1000005;
const int SQRTN = 1003;
const int LOGN = 22;
const double PI=acos(-1);

#ifdef int
const int INF=1e16;
#else
const int INF=1e9;
#endif

const int MOD = 1000000007;
const int FMOD = 998244353;
const double eps = 1e-9;

bool primes[100001];
int spf[100001];

void sieve()
{
	 primes[0]=primes[1]=false;
	 for(int i=1;i<=100000;i++)
	 {
	 	 spf[i]=i;
	 	 primes[i]=true;
	 }
	 spf[2]=2;
	 for(int i=4;i<=100000;i+=2)
	 {
	 	 spf[i]=2;
	 	 primes[i]=false;
	 }
	 for(int i=3;i*i<=100000;i+=2)
	 {
	 	 if(spf[i]==i)
	 	  {
	 	  	  for(int j=i*i;j<=100000;j+=i)
	 	  	  {
	 	  	  	 if(spf[j]==j)
	 	  	  	  spf[j]=i;
	 	  	  	 primes[j]=false;
			  }
		  }
	 }
	 return ;
}

int power(int n, int m,int p)
{
	 int res=1;
	 n=n%MOD;
	 while(m>0)
	 {
	 	 if(m&1)
	 	 {
	 	 	 res=((res)%p*(n)%p)%p;
	 	 	 m--;
		 }
		  n=((n)%p*(n)%p)%p;
		  m>>=1;
	 }
	 return res;
}








int N=10000;
int factorialNumInverse [100001];
int naturalNumInverse[100001];
int fact[100001];

void InverseofNumber(ll p)
{
    naturalNumInverse[0] = naturalNumInverse[1] = 1;
    for (int i = 2; i <= N; i++)
        naturalNumInverse[i] = naturalNumInverse[p % i] * (p - p / i) % p;
}
void InverseofFactorial(ll p)
{
    factorialNumInverse[0] = factorialNumInverse[1] = 1;

    for (int i = 2; i <= N; i++)
        factorialNumInverse[i] = (naturalNumInverse[i] * factorialNumInverse[i - 1]) % p;
}

void factorial(ll p)
{
    fact[0] = 1;

    for (int i = 1; i <= N; i++) {
        fact[i] = (fact[i - 1] * i) % p;
    }
}

int Binomial(int N, int R, int p)
{
    int ans = ((fact[N] * factorialNumInverse[R])
              % p * factorialNumInverse[N - R])
             % p;
    return ans;
}



int modInverse(int n,int p)
{
    return power(n, p - 2, p);
}

int nCrModPFermat(int n,int r, int p)
{

    if (n < r)
        return 0;
    if (r == 0)
        return 1;

    int fac[n + 1];
    fac[0] = 1;
    for (int i = 1; i <= n; i++)
        fac[i] = (fac[i - 1] * i) % p;

    return (fac[n] * modInverse(fac[r], p) % p
            * modInverse(fac[n - r], p) % p)
           % p;
}






void solvethetestcase();

signed main()
{
    FAST_IO
    //sieve();
    int t = 1;
    cin >> t;
    FOR(testcase,1,t+1){
       // printf("Case #%lld: ",testcase);
        solvethetestcase();
    }

}

int n,m,a,b,c,d,zero,p,t1,t2,t,q,cnt;






void solvethetestcase(){
	int cap[3];
	cin>>cap[0]>>cap[1]>>cap[2];
	int quan[5];
	cin>>quan[0]>>quan[1]>>quan[2]>>quan[3]>>quan[4];
	if(cap[0]<quan[0]||cap[1]<quan[1]||cap[2]<quan[2])
	cout<<"NO\n";
	else
	{
		cap[0]-=quan[0];
		cap[1]-=quan[1];
		cap[2]-=quan[2];
		if(cap[0]>quan[3])
		cap[0]-=quan[3];
		else
		{
			 quan[3]-=cap[0];
			 if(cap[2]<quan[3])
			 {
			 	 cout<<"NO\n";
			 	 return ;
			 }
			 else
			 cap[2]-=quan[3];
		}
		if(cap[1]>quan[4])
		cap[1]-=quan[4];
		else
		{
			 quan[4]-=cap[1];
			 if(cap[2]<quan[4])
			 {
			 	 cout<<"NO\n";
			 	 return ;
			 }
			 else
			 cap[2]-=quan[4];
		}
		if(cap[0]<0||cap[1]<0||cap[2]<0)
		cout<<"NO\n";
		else
		cout<<"YES\n";
		
	}
	return ;
}



/*
anshu shandilya
*/