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 JAVA):

Solution:
import java.util.*;
import java.io.*;  
 
public class Solution{
    // public static class pair{
    //     int x;
    //     int y;
    // }
    public static class FastScanner {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st=new StringTokenizer("");
        public String next() {
			while (st == null || !st.hasMoreElements())
				try {
					st=new StringTokenizer(br.readLine());
				} catch (IOException e) {
					e.printStackTrace();
				}
			return st.nextToken();
		}
		public int nextInt() {
			return Integer.parseInt(next());
		}
		public long nextLong() {
			return Long.parseLong(next());
		}
		public int[] readArray(int n) {
			int[] a=new int[n];
			for (int i=0; i<n; i++) {
				a[i]=nextInt();
			}
			return a;
		}public double nextDouble() {
			return Double.parseDouble(next());
		}
    }
    public static class pair{
        int x;
        int y;
        public pair(int a,int b){
            x=a;
            y=b;
        }
    }
    static long[] fac=fact();
    static long[] fact(){
        long[] fac = new long[200001];
        fac[0] = (long)1;
        for (int i = 1; i < (int)fac.length; i++){
            fac[i] = (fac[i - 1] * i) % 1000000007;
        }
        return fac;
    }
    public static void main(String[] args) throws IOException{
        FastScanner fs=new FastScanner();
		int t=fs.nextInt();
		PrintWriter out=new PrintWriter(System.out);
		while(t-->0){
		    int c1=fs.nextInt();
		    int c2=fs.nextInt();
		    int c3=fs.nextInt();
		    int a1=fs.nextInt();
		    int a2=fs.nextInt();
		    int a3=fs.nextInt();
		    int a4=fs.nextInt();
		    int a5=fs.nextInt();
		    if(c1<a1 || c2<a2 || c3<a3){
		        System.out.println("NO");
		        continue;
		    }
		    c3-=a3;
		    c1-=a1;
		    c2-=a2;
		    if(a4>c1+c3){
		        System.out.println("NO");
		        continue;
		    }
		    int left=Math.max(0,a4-c1);
		    c3-=left;
		    if(a5>c2+c3){
		        System.out.println("NO");
		        continue;
		    }
		    System.out.println("YES");
		}
        out.close();
    }
    public static String call(int in,char[] arr){
        StringBuffer sb=new StringBuffer();
        for(int i=0;i<in;i++){
            sb.append(arr[i]+"");
        }
        sb.append(arr[arr.length-1]+"");
        for(int i=in+1;i<arr.length-1;i++){
            sb.append(arr[i]+"");
        }
        sb.append(arr[in]+"");
        return sb.toString();
    }
    public static long gcdFind(long[] arr){
        long result = (long)0; 
        for (long element: arr){ 
            result = gcd(result, element);
  
            if(result == (long)1) 
            { 
               return 1; 
            } 
        } 
        return result;
    }
    public static int dfs(int in,ArrayList<Integer>[] adj,HashSet<Integer> set,HashMap<Integer,Integer> vis){
        if(vis.containsKey(in)){
            return 1;
        }
        if(set.contains(in)){
            return 0;
        }
        vis.put(in,1);
        ArrayList<Integer> l=adj[in-1];
        if(l.size()==0){
            return 2;
        }
        return dfs(l.get(0),adj,set,vis);
    }
    public static boolean check(long n){
        String s=n+"";
        HashMap<Integer,Integer> set=new HashMap<>();
        for(int i=0;i<s.length();i++){
            if(s.charAt(i)!='0'){
                set.put(s.charAt(i)-'0',1);
            }
        }
        for(int key:set.keySet()){
            if(n%key!=0){
                return false;
            }
        }
        return true;
    }
    public static void sort(int[] array){
		ArrayList<Integer> copy = new ArrayList<>();
		for(int i:array){
			copy.add(i);
		}
		Collections.sort(copy);
		for(int i=0;i<array.length;i++){
			array[i]=copy.get(i);
		}
	}
    static long power(long x, long y, long p){
        long res = 1;
        x = x % p;
        while (y > 0) {
            if (y % 2 == 1)
                res = (res * x) % p;
            y = y >> 1; // y = y/2
            x = (x * x) % p;
        }
        return res;
    }
    public static long modInverse(long n, long p){
        return power(n, p - 2, p);
    }
    public static long nCr(long n, long r,long p){
        if (n<r) 
              return (long)0;
        if (r == 0)
            return (long)1;
        return (fac[(int)n] * modInverse(fac[(int)r], p)% p * modInverse(fac[(int)(n - r)], p)% p)% p;
    }
    public static int upp(int[] arr,int v){
        int low=0;
        int high=arr.length-1;
        int ans=-1;
        while(low<=high){
            int m=(low+high)/2;
            if(arr[m]<v){
                ans=m;
                low=m+1;
            }else{
                high=m-1;
            }
        }
        return ans+1;
    }
    public static int low(int[] arr,int v){
        int low=0;
        int high=arr.length-1;
        int ans=-1;
        while(low<=high){
            int m=(low+high)/2;
            if(arr[m]>v){
                ans=m;
                high=m-1;
            }else{
                low=m+1;
            }
        }
        return ans;
    }
    public static class Comp implements Comparator<pair>{
        public int compare(pair a,pair b){
            if(a.y==b.y){
                return a.x-b.x;
            }else{
                return b.y-a.y;
            }
        }
    }
    public static long gcd(long a,long b){
        if (b == 0) 
        return a; 
        return gcd(b, a % b);
    }
    public static int lcm(int a,int b){
        int x=Math.max(a,b);
        int y=Math.min(a,b);
        long ans=x;
        while(ans%y!=0){
            ans+=x;
        }
        if(ans>Integer.MAX_VALUE){
            return -1;
        }
        return (int)ans;
    }
    public static long fact(int n){
        long ans=1;
        for(int i=1;i<=n;i++){
            ans*=i;
        }
        return ans;
    }
}