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.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.awt.Rectangle;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws IOException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader sc = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        Task solver = new Task();
        solver.solve(1, sc, out);
        out.close();
    }

    static class Task {   	
        public void solve(int testNumber, InputReader sc, PrintWriter out) throws IOException {
        	int x1=sc.nextInt();
        	int y1=sc.nextInt();
        	int x2=sc.nextInt();
        	int y2=sc.nextInt();
        	int x3=sc.nextInt();
        	int y3=sc.nextInt();
        	int x4=sc.nextInt();
        	int y4=sc.nextInt();
        	int x5=sc.nextInt();
        	int y5=sc.nextInt();
        	int x6=sc.nextInt();
        	int y6=sc.nextInt();
        	
        	Rectangle s1=new Rectangle(x1,y1,x2-x1,y2-y1);
        	Rectangle s2=new Rectangle(x3,y3,x4-x3,y4-y3);
        	Rectangle s3=new Rectangle(x5,y5,x6-x5,y6-y5);
        	Rectangle s4=s1.intersects(s2)?s1.intersection(s2):null;
        	Rectangle s5=s1.intersects(s3)?s1.intersection(s3):null;
            Rectangle s6=null;
            if(s5!=null&&s4!=null&&s4.intersects(s5))
            	s6=s4.intersection(s5);
        	long c1=s4==null?0:1l*s4.width*s4.height;
        	long c2=s5==null?0:1l*s5.width*s5.height;
        	long c3=s6==null?0:1l*s6.width*s6.height;
        	
        	long ans=c1+c2-c3;
        	if(ans>=1l*(x2-x1)*(y2-y1)) {
        		
        		out.println("NO");
        	}
        	else 
        		out.println("YES");
        }
    }

    static class InputReader {
        private InputStreamReader reader;
        private char[] buf;
        private int len, now;
     
        public InputReader(InputStream stream) {
            reader = new InputStreamReader(stream);
            buf = new char[1024];
            len = 0;
            now = 0;
        }
     
        public String next() throws IOException {
            if (!hasNext()) throw new NullPointerException();
            StringBuilder sb = new StringBuilder();
            while (!isSpaceChar(buf[now])) {
                sb.append(buf[now]);
                if (!move()) break;
            }
            return sb.toString();
        }
     
        public int nextInt() throws IOException {
            if (!hasNext()) throw new NullPointerException();
            boolean x = false;
            if (buf[now] == '-') {
                x = true;
                if (!move()) throw new NumberFormatException();
            }
            int ans = 0;
            while (!isSpaceChar(buf[now])) {
                if (isNum(buf[now])) ans = ans * 10 + buf[now] - '0';
                else throw new NumberFormatException();
                if (!move()) break;
            }
            return (x ? -1 : 1) * ans;
        }
     
        public String nextLine() throws IOException {
            if (!hasNextLine()) throw new NullPointerException();
            StringBuilder sb = new StringBuilder();
            while (buf[now] != '\n') {
                sb.append(buf[now]);
                if (!move()) return sb.toString();
            }
            now++;
            return sb.toString();
        }
     
        public long nextLong() throws IOException {
            if (!hasNext()) throw new NullPointerException();
            boolean x = false;
            if (buf[now] == '-') {
                x = true;
                if (!move()) throw new NumberFormatException();
            }
            long ans = 0;
            while (!isSpaceChar(buf[now])) {
                if (isNum(buf[now])) ans = ans * 10 + buf[now] - '0';
                else throw new NumberFormatException();
                if (!move()) break;
            }
            return (x ? -1 : 1) * ans;
        }
     
        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
     
        public int nextHexInt() throws IOException {
            if (!hasNext()) throw new NullPointerException();
            boolean x = false;
            if (buf[now] == '-') {
                x = true;
                if (!move()) throw new NumberFormatException();
            }
            int ans = 0;
            while (!isSpaceChar(buf[now])) {
                if (isHex(buf[now])) ans = ans * 16 + toHex(buf[now]);
                else throw new NumberFormatException();
                if (!move()) break;
            }
            return (x ? -1 : 1) * ans;
        }
     
        public char nextChar() throws IOException {
            if (!hasNext()) throw new NullPointerException();
            char tmp = buf[now];
            move();
            return tmp;
        }
        public int next(char[] s) throws IOException {
            if (!hasNext()) throw new NullPointerException();
            int len=0;
            while (!isSpaceChar(buf[now])&&len<s.length) {
                s[len++]=buf[now];
                if (!move()) break;
            }
            return len;
        }
        public boolean hasNext() throws IOException {
            return skip();
        }
     
        public boolean hasNextLine() throws IOException {
            return now < len || refill();
        }
     
        private boolean move() throws IOException {
            now++;
            return hasNextLine();
        }
     
        private boolean skip() throws IOException {
            if (!hasNextLine()) return false;
            while (isSpaceChar(buf[now])) {
                if (!move()) return false;
            }
            return true;
        }
     
        private boolean isSpaceChar(char c) {
            return !(c >= 33 && c <= 126);
        }
     
        private boolean isNum(char c) {
            return c >= '0' && c <= '9';
        }
     
        private boolean isHex(char c) {
            return c >= '0' && c <= '9' || c >= 'A' && c <= 'F';
        }
     
        private int toHex(char c) {
            if (c >= '0' && c <= '9') return c - '0';
            else return c - 'A' + 10;
        }
     
        private boolean refill() throws IOException {
            len = reader.read(buf);
            now = 0;
            return len > 0;
        }
    }
}
