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.*;
import java.text.*;
import java.util.*;
import java.math.*;
public class C {
  static int leftmostBlockedX;
  static int rightmostBlockedX;
  static int bottommostBlockedY;
  static int topmostBlockedY;
  public static void main(String[] args) throws Exception {
    new C().run();
  }
  public void run() throws Exception {
    FastScanner f = new FastScanner();
    PrintWriter out = new PrintWriter(System.out);
    // read in the locations of the first billboard
    int x1 = f.nextInt();
    int y1 = f.nextInt();
    int x2 = f.nextInt();
    int y2 = f.nextInt();
    
    // read in the locations of the second billboard
    int x3 = f.nextInt();
    int y3 = f.nextInt();
    int x4 = f.nextInt();
    int y4 = f.nextInt();
    
    // read in the locations of the truck
    int x5 = f.nextInt();
    int y5 = f.nextInt();
    int x6 = f.nextInt();
    int y6 = f.nextInt();
        
    long visibleArea = areaOfRectangle(x1, y1, x2, y2);
    // the visible area is the sum of the visible area of the first billboard and the second billboard
    long combinedArea = visibleArea(x1, y1, x2, y2, x5, y5, x6, y6) + visibleArea(x3, y3, x4, y4, x1, y1, x2, y2);
    long intersection = visibleArea(x5,y5,x6,y6,x3,y3,x4,y4);
    intersection = visibleArea(leftmostBlockedX,bottommostBlockedY,rightmostBlockedX, topmostBlockedY,x1,y1,x2,y2);
    if(visibleArea + intersection - combinedArea <= 0){
      //System.out.println("NO");
      //out.println(visibleArea);
      //out.println(combinedArea);
      out.println("NO");
    }
    else{
      //System.out.println("YES");
      //out.println(visibleArea);
      //out.println(combinedArea);
      //out.println(intersection);
      out.println("YES");
    }
    out.flush();
  }
  
  public static long areaOfRectangle(long x1, long y1, long x2, long y2) {
    //System.out.println(x2-x1);
    //System.out.println(y2-y1);
    //System.out.println((x2-x1)*(y2-y1));
    return (x2-x1)*(y2-y1);
  }
  
  /**
   * Given the corners of two rectangles, return the area inside the first rectangle
   * but outside the second
   * @param x1 x-coordinate of lower-left corner of first rectangle
   * @param y1 y-coordinate of lower-left corner of first rectangle
   * @param x2 x-coordinate of upper-right corner of first rectangle
   * @param y2 y-coordinate of upper-right corner of first rectangle
   * @param x3 x-coordinate of lower-left corner of second rectangle
   * @param y3 y-coordinate of upper-right corner of second rectangle
   * @param x4 x-coordinate of lower-left corner of second rectangle
   * @param y4 y-coordinate of upper-right corner of second rectangle
   * @return
   */
  public static long visibleArea(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4) {
    // start by computing the area that would be visible if there were no second rectangle
    // compute the boundaries of the intersection
      leftmostBlockedX = Math.max(x1, x3);
      rightmostBlockedX = Math.min(x2, x4);
      bottommostBlockedY = Math.max(y1, y3);
      topmostBlockedY = Math.min(y2, y4);
    // if the second rectangle does exist, subtract out the area that it blocks
    if(leftmostBlockedX < rightmostBlockedX && bottommostBlockedY < topmostBlockedY) {
      return areaOfRectangle(leftmostBlockedX, bottommostBlockedY, rightmostBlockedX, topmostBlockedY);
    }
    return 0;
  }
  static class FastScanner {
    public BufferedReader reader;
        public StringTokenizer tokenizer;
        public FastScanner() {
          reader = new BufferedReader(new InputStreamReader(System.in), 32768);
          tokenizer = null;
        }
        public String next() {
          while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                  tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                  throw new RuntimeException(e);
                }
          }
          return tokenizer.nextToken();
        }
        public int nextInt() {
          return Integer.parseInt(next());
        }
        public long nextLong() {
          return Long.parseLong(next());
        }
        public double nextDouble() {
          return Double.parseDouble(next());
        }
        public String nextLine() {
          try {
            return reader.readLine();
          } catch(IOException e) {
            throw new RuntimeException(e);
          }
        }
  }
}