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.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.stream.Collector;
import java.util.stream.Collectors;

import static java.util.stream.Collectors.toCollection;

public class WhiteSheetOverlap_587Div3ProbC {

    public static class Rectangle{
        private int lowx, lowy, upx, upy;
//        private int id;


//        public Rectangle(int my_id, int lx, int ly, int ux, int uy) {
        public Rectangle(int lx, int ly, int ux, int uy) {
            lowx = lx;
            lowy = ly;
            upx = ux;
            upy = uy;
//            id = my_id;
        }

        public int getUpx() {
            return upx;
        }

        public void setUpx(int upx) {
            this.upx = upx;
        }

        public int getLowx() {
            return lowx;
        }

        public void setLowx(int lowx) {
            this.lowx = lowx;
        }

        public int getLowy() {
            return lowy;
        }

        public void setLowy(int lowy) {
            this.lowy = lowy;
        }

        public int getUpy() {
            return upy;
        }

        public void setUpy(int upy) {
            this.upy = upy;
        }

        public long calcArea(){
            return (long)(upy - lowy)*(upx - lowx);
        }


//        public int getId() {
//            return id;
//        }
//
//        public void setId(int id) {
//            this.id = id;
//        }
    }
//    private static <T> ArrayList<T> getByIndices(ArrayList<T> list, Integer[] indexes) {
//        return (ArrayList<T>) Arrays.asList(indexes).stream().map(list::get).collect((Collector<? super T, Object, ArrayList<Rectangle>>) toCollection(ArrayList<Rectangle>::new));
//    }

    private static boolean checkRectanglesOverlap(Rectangle white, Rectangle black){
        int x_lower_white = white.getLowx();
        int y_lower_white = white.getLowy();
        int x_upper_white = white.getUpx();
        int y_upper_white = white.getUpy();

        int x_lower_black = black.getLowx();
        int y_lower_black = black.getLowy();
        int x_upper_black = black.getUpx();
        int y_upper_black = black.getUpy();

        return !(x_upper_black <= x_lower_white || x_upper_white <= x_lower_black || y_upper_black <= y_lower_white || y_lower_black >= y_upper_white);


    }

    private static Rectangle calculateOverlappingRectangle(Rectangle white, Rectangle black){
        int x_lower_white = white.getLowx();
        int y_lower_white = white.getLowy();
        int x_upper_white = white.getUpx();
        int y_upper_white = white.getUpy();

        int x_lower_black = black.getLowx();
        int y_lower_black = black.getLowy();
        int x_upper_black = black.getUpx();
        int y_upper_black = black.getUpy();

        int lower_x_overlap = Math.max(x_lower_white, x_lower_black);
        int upper_x_overlap = Math.min(x_upper_white, x_upper_black);
        int lower_y_overlap = Math.max(y_lower_white, y_lower_black);
        int upper_y_overlap = Math.min(y_upper_white, y_upper_black);

        return new Rectangle(lower_x_overlap, lower_y_overlap, upper_x_overlap, upper_y_overlap);


    }

    public static String check_if_white_rect_visible(Rectangle white, Rectangle black1, Rectangle black2) {
        String result = "YES";
        long current_overlap_area = 0;
        long overlap_area_1 = 0;
        long overlap_area_2 = 0;
        long common_among_overlaps = 0;
        Rectangle overlap_rect_1 = new Rectangle(0, 0, 0, 0);
        Rectangle overlap_rect_2 = new Rectangle(0, 0, 0, 0);
        Rectangle common_overlap_rect = new Rectangle(0, 0, 0, 0);
        if (checkRectanglesOverlap(white, black1)) {
            overlap_rect_1 = calculateOverlappingRectangle(white, black1);
            overlap_area_1 = overlap_rect_1.calcArea();
        }
        if (checkRectanglesOverlap(white, black2)) {
            overlap_rect_2 = calculateOverlappingRectangle(white, black2);
            overlap_area_2 = overlap_rect_2.calcArea();
        }
        if (checkRectanglesOverlap(overlap_rect_1, overlap_rect_2)) {
            common_overlap_rect = calculateOverlappingRectangle(overlap_rect_1, overlap_rect_2);
            common_among_overlaps = common_overlap_rect.calcArea();
        }

        current_overlap_area = overlap_area_1 + overlap_area_2 - common_among_overlaps;

        long area_left = white.calcArea() - current_overlap_area;

        return (area_left > 0) ? "YES" : "NO";
    }



    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out, true);
        int numRect = 3;
        ArrayList<Rectangle> rect_list = new ArrayList<Rectangle>();
        for (int i = 0; i < numRect; i++) {

            StringTokenizer st = new StringTokenizer(br.readLine());
            int x_lower = Integer.parseInt(st.nextToken());
            int y_lower = Integer.parseInt(st.nextToken());
            int x_upper = Integer.parseInt(st.nextToken());
            int y_upper = Integer.parseInt(st.nextToken());
            rect_list.add(new Rectangle(x_lower, y_lower, x_upper, y_upper));

        }
        Rectangle white_rect =  (Rectangle) rect_list.get(0);
        Rectangle black_rect1 = (Rectangle) rect_list.get(1);
        Rectangle black_rect2 = (Rectangle) rect_list.get(2);
//        ArrayList<Rectangle> black_rects_list =  (ArrayList<Rectangle>) rect_list.stream().filter(p-> rect_list.indexOf(p) != 0).collect(Collectors.toList());
//        Rectangle[] black_rects = (Rectangle[]) (black_rects_list.toArray());

        String result = "YES";

        result = check_if_white_rect_visible(white_rect, black_rect1, black_rect2);
        out.println(result);
        out.close();
        br.close();
    }

}
