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.math.BigInteger;
import java.util.*;
import java.util.stream.Collector;
import java.util.stream.Collectors;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;

/**
 *
 * @author Saju
 *
 */

public class Main {

	static int[] dx = { 0, 1, 0, -1 };
	static int[] dy = { -1, 0, 1, 0 };

	static int[] ddx = { 0, 1, 0, -1, -1, 1, 1, -1 };
	static int[] ddy = { -1, 0, 1, 0, -1, -1, 1, 1 };

	static int[] kx = { 2, 1, -1, -2, -2, -1, 1, 2 };
	static int[] ky = { 1, 2, 2, 1, -1, -2, -2, -1 };

	static long MOD = Long.MAX_VALUE;

	static final int MAX = 50000;
	static long INF = Long.MAX_VALUE;

	static double PI = 3.1415926535;

	private static final double EPSILON = 1e-10;

	public static void main(String[] args) {

		InputReader in = new InputReader(System.in);

		/*
			
				
		*/

		int x1 = in.nextInt();
		int y1 = in.nextInt();
		int x2 = in.nextInt();
		int y2 = in.nextInt();
		Box whiteBox = new Box(new Point(x1, y1), new Point(x2, y2));

		
		x1 = in.nextInt();
		y1 = in.nextInt();
		x2 = in.nextInt();
		y2 = in.nextInt();
		Box firstBox = new Box(new Point(x1, y1), new Point(x2, y2));

		x1 = in.nextInt();
		y1 = in.nextInt();
		x2 = in.nextInt();
		y2 = in.nextInt();
		Box secondBox = new Box(new Point(x1, y1), new Point(x2, y2));

		if(fullyCoveredWhiteBox(whiteBox, firstBox) || fullyCoveredWhiteBox(whiteBox, secondBox)){
			System.out.println("NO");
		}
		else if(boxFullyInsideToWhiteBox(whiteBox, firstBox) && boxFullyInsideToWhiteBox(whiteBox, secondBox)){
			System.out.println("YES");
		}
		else if((boxFullyOutsideToWhiteBox(whiteBox, firstBox) && boxFullyOutsideToWhiteBox(whiteBox, secondBox))){
			System.out.println("YES");
		}
		else if(boxFullyOutsideToWhiteBox(whiteBox, firstBox)){
			if(fullyCoveredWhiteBox(whiteBox, secondBox)){
				System.out.println("NO");
			}
			else{
				System.out.println("YES");
			}
		}
		else if(boxFullyOutsideToWhiteBox(whiteBox, secondBox)){
			if(fullyCoveredWhiteBox(whiteBox, firstBox)){
				System.out.println("NO");
			}
			else{
				System.out.println("YES");
			}
		}
		else{
			boolean ans = solve(firstBox, secondBox, whiteBox);
			if(!ans){
				ans = solve(secondBox, firstBox, whiteBox);
				if(!ans){
					System.out.println("YES");
				}
			}
		}
		System.exit(0);
	}

	private static boolean solve(Box firstBox, Box secondBox, Box whiteBox){
		if(whiteBox.bottomLeft.x <= firstBox.bottomLeft.x && whiteBox.bottomLeft.y >= firstBox.bottomLeft.y
				&& whiteBox.topRight.x <= firstBox.topRight.x && whiteBox.topRight.y <= firstBox.topRight.y ){
			// white box left
			
			if(secondBox.topRight.x >= firstBox.bottomLeft.x
					&& secondBox.bottomLeft.x <= whiteBox.bottomLeft.x
					&& secondBox.topRight.y >= whiteBox.topRight.y
					&& secondBox.bottomLeft.y <= whiteBox.bottomLeft.y){
				System.out.println("NO");
				return true;
			}
			else{
//				System.out.println("YES");
				return false;
			}
		}
		else if(whiteBox.bottomLeft.x >= firstBox.bottomLeft.x && whiteBox.bottomLeft.y <= firstBox.bottomLeft.y
				&& whiteBox.topRight.x <= firstBox.topRight.x && whiteBox.topRight.y <= firstBox.topRight.y){
			// white box bottom
			
			if(secondBox.topRight.y >= firstBox.bottomLeft.y
					&& secondBox.bottomLeft.y <= whiteBox.bottomLeft.y
					&& secondBox.bottomLeft.x <= whiteBox.bottomLeft.x
					&& secondBox.topRight.x >= whiteBox.topRight.x){
				System.out.println("NO");
				return true;
			}
			else{
//				System.out.println("YES");
				return false;
			}
				
		}
		else if(whiteBox.bottomLeft.x >= firstBox.bottomLeft.x && whiteBox.bottomLeft.y >= firstBox.bottomLeft.y
				&& whiteBox.topRight.x >= firstBox.topRight.x && whiteBox.topRight.y <= firstBox.topRight.y){
			// white box right
			
			if(secondBox.bottomLeft.x <= firstBox.topRight.x
					&& secondBox.topRight.x >= whiteBox.topRight.x 
					&& secondBox.topRight.y >= whiteBox.topRight.y
					&& secondBox.bottomLeft.y <= whiteBox.bottomLeft.y){
				System.out.println("NO");
				return true;
			}
			else{
//				System.out.println("YES");
				return false;
			}
			
		}
		else if(whiteBox.bottomLeft.x >= firstBox.bottomLeft.x && whiteBox.bottomLeft.y >= firstBox.bottomLeft.y
				&& whiteBox.topRight.x <= firstBox.bottomLeft.x && whiteBox.topRight.y >= firstBox.topRight.y){
			// white box top
			
			if(secondBox.bottomLeft.y <= firstBox.topRight.y
					&& secondBox.topRight.y >= whiteBox.topRight.y
					&& secondBox.bottomLeft.x <= whiteBox.bottomLeft.x
					&& secondBox.topRight.x >= whiteBox.topRight.x){
				System.out.println("NO");
				return true;
			}
			else{
//				System.out.println("YES");
				return false;
			}
			
		}
		return false;
	}
	private static boolean boxFullyInsideToWhiteBox(Box whiteBox, Box box) {

		if (box.bottomLeft.x > whiteBox.bottomLeft.x && box.bottomLeft.y > whiteBox.bottomLeft.y
				&& box.topRight.x < whiteBox.topRight.x && box.topRight.y < whiteBox.topRight.y) {
			return true;
		}
		return false;
	}

	private static boolean fullyCoveredWhiteBox(Box whiteBox, Box box) {

		if (box.bottomLeft.x <= whiteBox.bottomLeft.x && box.bottomLeft.y <= whiteBox.bottomLeft.y
				&& box.topRight.x >= whiteBox.topRight.x && box.topRight.y >= whiteBox.topRight.y) {
			return true;
		}

		return false;
	}

	private static boolean boxFullyOutsideToWhiteBox(Box whiteBox, Box box) {

		if (isLeftToWhiteBox(whiteBox, box) || isRightToWhiteBox(whiteBox, box) || isUPToWhiteBox(whiteBox, box)
				|| isBottomToWhiteBox(whiteBox, box)) {
			return true;
		}

		return false;
	}

	private static boolean isLeftToWhiteBox(Box whiteBox, Box box) {

		if (box.topRight.x <= whiteBox.bottomLeft.x) {
			return true;
		}
		return false;
	}

	private static boolean isUPToWhiteBox(Box whiteBox, Box box) {

		if (box.bottomLeft.y >= whiteBox.topRight.y) {
			return true;
		}
		return false;
	}

	private static boolean isRightToWhiteBox(Box whiteBox, Box box) {

		if (box.bottomLeft.x >= whiteBox.topRight.x) {
			return true;
		}
		return false;
	}

	private static boolean isBottomToWhiteBox(Box whiteBox, Box box) {

		if (box.topRight.y <= whiteBox.bottomLeft.y) {
			return true;
		}
		return false;
	}

	private static class Box implements Comparable<Box> {
		Point bottomLeft;
//		Point bottomRight;
//		Point topLeft;
		Point topRight;

		Box(Point bottomLeft, Point topRight) {
			this.bottomLeft = bottomLeft;
			this.topRight = topRight;
//			this.bottomRight = new Point(topRight.x, bottomLeft.y);
//			this.topLeft = new Point(bottomLeft.x, topRight.y);
		}

		@Override
		public int compareTo(Box box) {
			int val = this.bottomLeft.x - box.bottomLeft.x;
			return 0;
		}
	}

	private static class Point {
		int x;
		int y;

		Point(int x, int y) {
			this.x = x;
			this.y = y;
		}

		@Override
		public String toString() {

			return this.x + " " + this.y;
		}
	}

	// private static long set(long N, int pos) {
	//
	// return N = N | (1 << pos);
	// }
	// private static long check(long N, int pos) {
	//
	// return N & (1 << pos);
	// }
	// private static long reset(long N, int pos){
	//
	// return N=N|~(1<<pos);
	// }

	// nCk
	// private static long binomialCoeff(int n, int k){
	// long[] arr = new long[k + 1];
	// arr[0] = 1;
	// for(int i = 1; i <= n; i++){
	// for(int j = Math.min(i, k); j > 0; j--){
	// arr[j] = (arr[j] + arr[j - 1]) % MOD;
	// }
	// }
	// return arr[k];
	// }

	// BIT =>
	// https://www.hackerearth.com/practice/notes/binary-indexed-tree-or-fenwick-tree/
	// static int BIT[] = new int[MAX + 5];
	//
	// private static int query(int index) {
	// int sum = 0;
	// for (; index > 0; index -= (index & (-index))) {
	// sum += BIT[index];
	// }
	// return sum;
	// }
	//
	// private static void update(int size, int index, int val) {
	// for (; index <= size; index += (index & (-index))) {
	// BIT[index] += val;
	// }
	// }

	/*
	 * 
	 * tutorial :
	 * https://helloacm.com/algorithms-series-0-1-backpack-dynamic-programming-
	 * and-backtracking/
	 * 
	 */

	// here arr and prob zero based index
	// static int backPack(int n, int m, int[] arr, double[] prob, double p) {
	// double dp[][] = new double[n + 1][m + 1];
	// for (int i = 0; i <= n; ++i) {
	// dp[i][0] = 1.0;
	// }
	// for (int i = 1; i <= n; i++) {
	// for (int j = 1; j <= m; j++) {
	//
	// if (j < arr[i - 1]) { // insufficient capacity
	// dp[i][j] = dp[i - 1][j];
	// } else {
	// dp[i][j] = Math.max(dp[i - 1][j], dp[i - 1][j - arr[i - 1]] * (1.0 -
	// prob[i - 1]));
	// }
	//
	// }
	// }
	// for (int i = m; i >= 0; i--) { // reverse checking the maximum weight
	// if ((1.0 - dp[n][i]) <= p) {
	// return i;
	// }
	// }
	// return 0;
	// }

	// here arr and prob one based index
	// static int backPack1(int n, int m, int[] arr, double[] prob, double p) {
	//
	// double dp[] = new double[m + 1];
	//
	// dp[0] = 1.0;
	// for (int i = 1; i <= n; i++) {
	// for (int j = m; j >= arr[i]; --j) {
	// // dp[j] = dp[j] || dp[j - A[i - 1]];
	// dp[j] = Math.max(dp[j], dp[j - arr[i]] * (1.0 - prob[i]));
	// }
	// }
	// for (int i = m; i >= 0; i--) {
	// if (1.0 - dp[i] <= p) {
	// return i;
	// }
	// }
	// return 0;
	// }

	/*
	 *
	 * tutorial :
	 * https://www.hackerearth.com/practice/algorithms/searching/ternary-search/
	 * tutorial/
	 *
	 */

	// lightoj -> 1146
	// static double ternary(Point a, Point b, Point c, Point d) {
	//
	// double l = 0;
	// double r = 1;
	//
	// for (int i = 0; i < 200; i++) {
	// double mid1 = l + ((r - l) / 3);
	// double mid2 = r - ((r - l) / 3);
	//
	// double dis1 = func(a, b, c, d, mid1);
	// double dis2 = func(a, b, c, d, mid2);
	//
	// if(dis1 > dis2){
	// l = mid1;
	//
	// }
	// else{
	// r = mid2;
	// }
	// }
	//
	// return l;
	//
	// }
	//
	// static double func(Point a, Point b, Point c, Point d, double multiple) {
	//
	// double xDifAB = b.x - a.x;
	// double yDifAB = b.y - a.y;
	// double xDifCD = d.x - c.x;
	// double yDifCD = d.y - c.y;
	//
	// double x1 = a.x + xDifAB * multiple;
	// double y1 = a.y + yDifAB * multiple;
	// double x2 = c.x + xDifCD * multiple;
	// double y2 = c.y + yDifCD * multiple;
	//
	// double distance = Math.sqrt(((x1 - x2) * (x1 - x2)) +
	// ((y1 - y2) * (y1 - y2)));
	//
	// return distance;
	// }
	//
	// static class Point{
	// double x;
	// double y;
	//
	// Point(double x, double y){
	// this.x = x;
	// this.y = y;
	// }
	// }

	// static void primeFactorization(int n) {
	// int temp = n;
	// Map<Integer, Integer> map = new HashMap<Integer, Integer>();
	// for (int i = 2; i <= Math.sqrt(n); i++) {
	// if (n % i == 0) {
	// int count = 0;
	// while (n % i == 0) {
	// count++;
	// n = n / i;
	// }
	// System.out.println("i: " + i + ", count: " + count);
	// map.put(i, count);
	// }
	//
	// }
	// if (n != 1) {
	// System.out.println(n);
	// map.put(n, 1);
	// }
	//
	//// calculateSumOfDivisor(map, temp);
	// }

	// static int counter[] = new int[MAX];
	//
	// private static void calculateSumOfDivisor(Map<Integer, Integer> map, int
	// n) {
	// int sum = 1;
	// for(Integer key : map.keySet()){
	// int count = map.get(key);
	// sum *= ((Math.pow(key, count + 1) - 1) / (key - 1));
	// }
	// if(sum < MAX){
	// if(counter[sum] < n){
	//// System.out.println("H");
	// counter[sum] = n;
	// }
	//
	// }
	//
	//// System.out.println(sum);
	// }

	// static int phi[] = new int[MAX];
	// static int phiStepCount[] = new int[MAX];
	// static void computeTotient() {
	//
	// // Create and initialize an array to store
	// // phi or totient values
	// for (int i = 1; i < MAX; i++) {
	// phi[i] = i; // indicates not evaluated yet
	// // and initializes for product
	// // formula.
	// }
	//
	// // Compute other Phi values
	// for (int p = 2; p < MAX; p++) {
	//
	// // If phi[p] is not computed already,
	// // then number p is prime
	// if (phi[p] == p) {
	//
	// // Phi of a prime number p is
	// // always equal to p-1.
	// phi[p] = p - 1;
	//
	// // Update phi values of all
	// // multiples of p
	// for (int i = 2 * p; i < MAX; i += p) {
	//
	// // Add contribution of p to its
	// // multiple i by multiplying with
	// // (1 - 1/p)
	// phi[i] = (phi[i] / p) * (p - 1);
	// }
	//
	// // for (int i = p; i < MAX; i += p) {
	// //
	// // phi[i] -= (phi[i] / p);
	// // }
	//
	// }
	// phiStepCount[p] = phiStepCount[phi[p]] + 1;
	// }
	//
	// for(int i = 1; i < MAX; i++){
	// phiStepCount[i] += phiStepCount[i - 1];
	// }
	// }

	// public static BigInteger floorOfNthRoot(BigInteger x, int n) {
	// int sign = x.signum();
	// if (n <= 0 || (sign < 0))
	// throw new IllegalArgumentException();
	// if (sign == 0)
	// return BigInteger.ZERO;
	// if (n == 1)
	// return x;
	// BigInteger a;
	// BigInteger bigN = BigInteger.valueOf(n);
	// BigInteger bigNMinusOne = BigInteger.valueOf(n - 1);
	// BigInteger b = BigInteger.ZERO.setBit(1 + x.bitLength() / n);
	// do {
	// a = b;
	// b = a.multiply(bigNMinusOne).add(x.divide(a.pow(n - 1))).divide(bigN);
	// } while (b.compareTo(a) == -1);
	// return a;
	// }

	// O(log(max(A, B))).
	// static long gcd(long a, long b) {
	// if (b == 0)
	// return a;
	// return gcd(b, a % b);
	// }

	private static double getDistance(double x1, double y1, double x2, double y2) {

		return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
	}

	// private static int getDecimal(String str) {
	// int val = 0;
	//
	// for (int i = str.length() - 1, j = 0; i >= 0; i--, j++) {
	// if (str.charAt(i) == '1') {
	// val += Math.pow(2, j);
	// }
	// }
	// return val;
	// }

	// private static int call(int i, int j, int[][] colors) {
	//
	// if (i >= colors.length) {
	// return 0;
	// }
	//
	// if (dp[i][j] != -1) {
	// return dp[i][j];
	//
	// }
	//
	// int result = Integer.MAX_VALUE;
	//
	// for (int k = 0; k < 3; k++) {
	// if (k == j) {
	// continue;
	// } else {
	// result = Math.min(result, call(i + 1, k, colors) + colors[i][j]);
	// }
	// }
	//
	// return dp[i][j] = result;
	// }

	static int dp[][];

	// private static BigInteger fac(int n, int mod) {
	//
	// if (n <= 0) {
	// return BigInteger.ONE;
	// }
	// return BigInteger.valueOf(n).multiply(fac(n - 1, mod));
	// }

	// private static long modInverse(long n, long m){
	// return bigMod(n, m - 2, m);
	// }

	private static long bigMod(long n, long k, long m) {

		long ans = 1;
		while (k > 0) {
			if ((k & 1) == 1) {
				ans = (ans * n) % m;
			}
			n = (n * n) % m;
			k >>= 1;
		}
		return ans;
	}

	// Returns an iterator pointing to the first element
	// in the range [first, last] which does not compare less than val.
	// private static int lowerBoundNew(long[] arr, long num){
	// int start = 0;
	// int end = arr.length - 1;
	// int index = 0;
	// int len = arr.length;
	// int mid = 0;
	// while(true){
	// if(start > end){
	// break;
	// }
	// mid = (start + end) / 2;
	// if(arr[mid] > num){
	// end = mid - 1;
	// }
	// else if(arr[mid] < num){
	// start = mid + 1;
	// }
	// else{
	// while(mid >= 0 && arr[mid] == num){
	// mid--;
	// }
	// return mid + 1;
	// }
	// }
	// if(arr[mid] < num){
	// return mid + 1;
	// }
	// return mid;
	// }

	// upper_bound() is a standard library function
	// in C++ defined in the header .
	// It returns an iterator pointing to
	// the first element in the range [first, last)
	// that is greater than value, or last if no such element is found
	// private static int upperBoundNew(long[] arr, long num){
	//
	// int start = 0;
	// int end = arr.length - 1;
	// int index = 0;
	// int len = arr.length;
	// int mid = 0;
	// while(true){
	// if(start > end){
	// break;
	// }
	// mid = (start + end) / 2;
	// if(arr[mid] > num){
	// end = mid - 1;
	// }
	// else if(arr[mid] < num){
	// start = mid + 1;
	// }
	// else{
	// while(mid < len && arr[mid] == num){
	// mid++;
	// }
	// if(mid == len - 1 && arr[mid] == num){
	// return mid + 1;
	// }
	// else{
	// return mid;
	// }
	// }
	// }
	// if(arr[mid] < num){
	// return mid + 1;
	// }
	// return mid;
	// }

	// private static int upperBound(long[] arr, long num) {
	//
	// int start = 0;
	// int end = arr.length;
	//
	// int mid = 0;
	// int index = 0;
	// while (true) {
	//
	//// System.out.println(start + " " + end);
	// if (start > end) {
	// break;
	// }
	// mid = (start + end) / 2;
	// if (arr[mid] > num) {
	// end = mid - 1;
	//
	// } else if (arr[mid] < num) {
	// start = mid + 1;
	// } else {
	// return mid;
	// }
	//
	//// System.out.println("a: " + start + " " + end);
	// }
	//
	// // System.out.println(mid);
	// if (arr[mid] < num) {
	// index = mid + 1;
	// } else {
	// index = mid;
	// }
	// return index;
	// }

	static class InputReader {
		public BufferedReader reader;
		public StringTokenizer tokenizer;

		public InputReader(InputStream stream) {
			reader = new BufferedReader(new InputStreamReader(stream));
			tokenizer = null;
		}

		public String next() {
			try {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					tokenizer = new StringTokenizer(reader.readLine());

				}
			} catch (IOException e) {
				return null;
			}
			return tokenizer.nextToken();
		}

		public String nextLine() {
			String line = null;
			try {
				tokenizer = null;
				line = reader.readLine();
			} catch (IOException e) {
				throw new RuntimeException(e);
			}
			return line;
		}

		public int nextInt() {
			return Integer.parseInt(next());
		}

		public double nextDouble() {
			return Double.parseDouble(next());
		}

		public long nextLong() {
			return Long.parseLong(next());
		}

		public boolean hasNext() {
			try {
				while (tokenizer == null || !tokenizer.hasMoreTokens()) {
					tokenizer = new StringTokenizer(reader.readLine());
				}
			} catch (Exception e) {
				return false;
			}
			return true;
		}
	}
}
