There is a white sheet of paper lying on a rectangle table. The sheet is a rectangle with its sides parallel to the sides of the table. If you will take a look from above and assume that the bottom left corner of the table has coordinates (0, 0), and coordinate axes are left and bottom sides of the table, then the bottom left corner of the white sheet has coordinates (x_1, y_1), and the top right — (x_2, y_2).

After that two black sheets of paper are placed on the table. Sides of both black sheets are also parallel to the sides of the table. Coordinates of the bottom left corner of the first black sheet are (x_3, y_3), and the top right — (x_4, y_4). Coordinates of the bottom left corner of the second black sheet are (x_5, y_5), and the top right — (x_6, y_6). 

<image> Example of three rectangles.

Determine if some part of the white sheet can be seen from the above after the two black sheets are placed. The part of the white sheet can be seen if there is at least one point lying not strictly inside the white sheet and strictly outside of both black sheets.

Input

The first line of the input contains four integers x_1, y_1, x_2, y_2 (0 ≤ x_1 < x_2 ≤ 10^{6}, 0 ≤ y_1 < y_2 ≤ 10^{6}) — coordinates of the bottom left and the top right corners of the white sheet.

The second line of the input contains four integers x_3, y_3, x_4, y_4 (0 ≤ x_3 < x_4 ≤ 10^{6}, 0 ≤ y_3 < y_4 ≤ 10^{6}) — coordinates of the bottom left and the top right corners of the first black sheet.

The third line of the input contains four integers x_5, y_5, x_6, y_6 (0 ≤ x_5 < x_6 ≤ 10^{6}, 0 ≤ y_5 < y_6 ≤ 10^{6}) — coordinates of the bottom left and the top right corners of the second black sheet.

The sides of each sheet of paper are parallel (perpendicular) to the coordinate axes.

Output

If some part of the white sheet can be seen from the above after the two black sheets are placed, print "YES" (without quotes). Otherwise print "NO".

Examples

Input


2 2 4 4
1 1 3 5
3 1 5 5


Output


NO


Input


3 3 7 5
0 0 4 6
0 0 7 4


Output


YES


Input


5 2 10 5
3 1 7 6
8 1 11 7


Output


YES


Input


0 0 1000000 1000000
0 0 499999 1000000
500000 0 1000000 1000000


Output


YES

Note

In the first example the white sheet is fully covered by black sheets.

In the second example the part of the white sheet can be seen after two black sheets are placed. For example, the point (6.5, 4.5) lies not strictly inside the white sheet and lies strictly outside of both black sheets.
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import java.util.stream.Stream;

/**
 *
 * @author sanchit
 */
public class another {
    public static void main(String[] args) throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String[] inW = br.readLine().trim().split(" ");
    int[] white = Stream.of(inW).mapToInt(Integer::parseInt).toArray();
    String[] inB1 = br.readLine().trim().split(" ");
    int[] black1 = Stream.of(inB1).mapToInt(Integer::parseInt).toArray();
    String[] inB2 = br.readLine().trim().split(" ");
    int[] black2 = Stream.of(inB2).mapToInt(Integer::parseInt).toArray();
    long ov1 = computeArea(white[0], white[1], white[2], white[3], black1[0], black1[1], black1[2], black1[3]);
    long areaOfWhite = ((long)white[2]-white[0])*(white[3]-white[1]);
    int[] arr1 = new int[4];
    int[] arr2 = new int[4];
    if(ov1!=0)
        arr1 = FindPoints(white[0], white[1], white[2], white[3], black1[0], black1[1], black1[2], black1[3]);
    
    long ov2 = computeArea(white[0], white[1], white[2], white[3], black2[0], black2[1], black2[2], black2[3]);
    if(ov2!=0)
        arr2 = FindPoints(white[0], white[1], white[2], white[3], black2[0], black2[1], black2[2], black2[3]);
//    for(int item:arr1)
//        System.out.print(item+" ");
//    System.out.println();
//    for(int item: arr2)
//        System.out.print(item+" ");
//    System.out.println();
    
    long ov3 = computeArea(arr1[0], arr1[1], arr1[2], arr1[3], arr2[0], arr2[1], arr2[2], arr2[3]);
    //System.out.println("area of white="+areaOfWhite+" ov1="+ov1+" ov2="+ov2+" ov3="+ov3);
    if(ov1+ov2-ov3 >= areaOfWhite)
        System.out.print("NO");
    else
        System.out.print("YES");
    }
    
    static long computeArea(int A, int B, int C, int D, int E, int F, int G, int H) {
        int left = Math.max(A, E);
        int right = Math.min(G, C);
        int bottom = Math.max(F, B);
        int top = Math.min(D, H);
        long overlap = 0;
        if(right > left && top > bottom)
             overlap = ((long)right - left) * ((long)top - bottom);
        return overlap;
    }
    static int[] FindPoints(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) 
        { 

            int x5 = Math.max(x1, x3); 
            int y5 = Math.max(y1, y3); 
            int x6 = Math.min(x2, x4); 
            int y6 = Math.min(y2, y4); 
            int[] arr = new int[4];
            if (x5 > x6 || y5 > y6)  
                return arr; 
            arr[0] = x5;
            arr[1] = y5;
            arr[2] = x6;
            arr[3] = y6;
            return arr;
        } 
    
    
}

    
    

