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

void solve()
{
    ll c1,c2,c3;
    cin >> c1 >> c2 >> c3;
    ll a1,a2,a3,a4,a5;
    cin >> a1 >> a2 >> a3 >> a4 >> a5;
    if(a1>c1 || a2>c2 || a3>c3){
        cout << "NO" << "\n";
        return;
    }
    c1-=a1;
    c2-=a2;
    c3-=a3;
    ll x = min(c1,a4);
    ll y = min(c2,a5);
    if((a4+a5-x-y)<=c3)
    cout << "YES" << "\n";
    else
    cout << "NO" << "\n";
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    ll t;
    cin >> t;
    while (t--)
    {
        solve();
    }
    return 0;
}