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.util.*;
 
import static java.lang.Math.*;
import static java.util.Arrays.*;
import static java.util.Collections.*;
import static java.util.Comparator.*;
 
public class Main {
    FastScanner in;
    PrintWriter out;
    ArrayList<Integer>[] graph;
    ArrayList<GraphPair>[] weightedGraph;
    long mod = (long) 1e9 + 7; // 998_244_353L || (long) 1e9 + 9
    boolean multitests = false;
 
    private void solve() throws IOException {
        // solveA();
        // solveB();
        solveC();
        // solveD();
        // solveE();
        // solveF();
        // solveG();
        // solveH();
        // solveI();
        // solveJ();
        // solveK();
        // solveL();
    }
 
    private void solveA() throws IOException {
        int n = in.nextInt(), ans = 0;
        char[] s = in.next().toCharArray();
        for (int i = 0; i + 1 < n; i += 2) {
            if (s[i] == s[i + 1]) {
                s[i] = 'a';
                s[i + 1] = 'b';
                ans++;
            }
        }
        out.println(ans);
        out.println(new String(s));
    }
 
    private void solveB() throws IOException {
        int n = in.nextInt();
        int[] a = in.nextIntArray(n);
        Integer[] id = new Integer[n];
        for (int i = 0; i < n; i++)
            id[i] = i;
        sort(id, comparingInt(o -> -a[o]));
        long ans = 0;
        for (int i = 0; i < n; i++) {
            ans += a[id[i]] * i + 1;
        }
        out.println(ans);
        for (int i = 0; i < n; i++) {
            out.print(id[i] + 1 + " ");
        }
    }
 
    private void solveC() throws IOException {
        long[] w = in.nextLongArray(4);
        long[] b1 = in.nextLongArray(4);
        long[] b2 = in.nextLongArray(4);
        if ((w[2] - w[0]) * (w[3] - w[1]) -
                max(0, min(w[2], b1[2]) - max(w[0], b1[0])) * max(0, min(w[3], b1[3]) - max(w[1], b1[1])) -
                max(0, min(w[2], b2[2]) - max(w[0], b2[0])) * max(0, min(w[3], b2[3]) - max(w[1], b2[1])) +
                max(0, min(min(w[2], b1[2]), b2[2]) - max(max(w[0], b1[0]), b2[0])) *
                        max(0, min(min(w[3], b1[3]), b2[3]) - max(max(w[1], b1[1]), b2[1])) > 0) {
            out.println("YES");
        } else {
            out.println("NO");
        }
    }
 
    private void solveD() throws IOException {
 
    }
 
    private void solveE() throws IOException {
 
    }
 
    private void solveF() throws IOException {
 
    }
 
    private void solveG() throws IOException {
 
    }
 
    private void solveH() throws IOException {
 
    }
 
    private void solveI() throws IOException {
 
    }
 
    private void solveJ() throws IOException {
 
    }
 
    private void solveK() throws IOException {
 
    }
 
    private void solveL() throws IOException {
 
    }
 
    void shuffleInt(int[] a) {
        Random random = new Random();
        for (int i = a.length - 1; i > 0; i--) {
            int j = random.nextInt(i + 1);
            int swap = a[j];
            a[j] = a[i];
            a[i] = swap;
        }
    }
 
    void shuffleLong(long[] a) {
        Random random = new Random();
        for (int i = a.length - 1; i > 0; i--) {
            int j = random.nextInt(i + 1);
            long swap = a[j];
            a[j] = a[i];
            a[i] = swap;
        }
    }
 
    void reverseInt(int[] a) {
        for (int i = 0, j = a.length - 1; i < j; i++, j--) {
            int swap = a[i];
            a[i] = a[j];
            a[j] = swap;
        }
    }
 
    void reverseLong(long[] a) {
        for (int i = 0, j = a.length - 1; i < j; i++, j--) {
            long swap = a[i];
            a[i] = a[j];
            a[j] = swap;
        }
    }
 
    int maxInt(int[] a) {
        int max = a[0];
        for (int i = 1; i < a.length; i++)
            if (max < a[i])
                max = a[i];
        return max;
    }
 
    long maxLong(long[] a) {
        long max = a[0];
        for (int i = 1; i < a.length; i++)
            if (max < a[i])
                max = a[i];
        return max;
    }
 
    int minInt(int[] a) {
        int min = a[0];
        for (int i = 1; i < a.length; i++)
            if (min > a[i])
                min = a[i];
        return min;
    }
 
    long minLong(long[] a) {
        long min = a[0];
        for (int i = 1; i < a.length; i++)
            if (min > a[i])
                min = a[i];
        return min;
    }
 
    long sumInt(int[] a) {
        long s = 0;
        for (int i = 0; i < a.length; i++)
            s += a[i];
        return s;
    }
 
    long sumLong(long[] a) {
        long s = 0;
        for (int i = 0; i < a.length; i++)
            s += a[i];
        return s;
    }
 
    long gcd(long a, long b) {
        return b == 0 ? a : gcd(b, a % b);
    }
 
    long binpowmod(long a, long n) {
        long res = 1;
        a %= mod;
        n %= mod - 1;
        while (n > 0) {
            if (n % 2 == 1)
                res = (res * a) % mod;
            a = (a * a) % mod;
            n /= 2;
        }
        return res;
    }
 
    class GraphPair implements Comparable<GraphPair> {
        int v;
        long w;
 
        GraphPair(int v, long w) {
            this.v = v;
            this.w = w;
        }
 
        public int compareTo(GraphPair o) {
            return w != o.w ? Long.compare(w, o.w) : Integer.compare(v, o.v);
        }
    }
 
    ArrayList<Integer>[] createGraph(int n) throws IOException {
        ArrayList<Integer>[] graph = new ArrayList[n];
        for (int i = 0; i < n; i++)
            graph[i] = new ArrayList<>();
        return graph;
    }
 
    ArrayList<GraphPair>[] createWeightedGraph(int n) throws IOException {
        ArrayList<GraphPair>[] graph = new ArrayList[n];
        for (int i = 0; i < n; i++)
            graph[i] = new ArrayList<>();
        return graph;
    }
 
    class FastScanner {
        StringTokenizer st;
        BufferedReader br;
 
        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s), 32768);
        }
 
        String next() throws IOException {
            while (st == null || !st.hasMoreTokens())
                st = new StringTokenizer(br.readLine());
            return st.nextToken();
        }
 
        boolean hasNext() throws IOException {
            return br.ready() || (st != null && st.hasMoreTokens());
        }
 
        int nextInt() throws IOException {
            return Integer.parseInt(next());
        }
 
        int[] nextIntArray(int n) throws IOException {
            int[] a = new int[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextInt();
            return a;
        }
 
        int[][] nextIntTable(int n, int m) throws IOException {
            int[][] a = new int[n][m];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m; j++)
                    a[i][j] = in.nextInt();
            return a;
        }
 
        long nextLong() throws IOException {
            return Long.parseLong(next());
        }
 
        long[] nextLongArray(int n) throws IOException {
            long[] a = new long[n];
            for (int i = 0; i < n; i++)
                a[i] = in.nextLong();
            return a;
        }
 
        long[][] nextLongTable(int n, int m) throws IOException {
            long[][] a = new long[n][m];
            for (int i = 0; i < n; i++)
                for (int j = 0; j < m; j++)
                    a[i][j] = in.nextLong();
            return a;
        }
 
        ArrayList<Integer>[] nextGraph(int n, int m, boolean directed) throws IOException {
            ArrayList<Integer>[] graph = createGraph(n);
            for (int i = 0; i < m; i++) {
                int v = in.nextInt() - 1, u = in.nextInt() - 1;
                graph[v].add(u);
                if (!directed)
                    graph[u].add(v);
            }
            return graph;
        }
 
        ArrayList<GraphPair>[] nextWeightedGraph(int n, int m, boolean directed) throws IOException {
            ArrayList<GraphPair>[] graph = createWeightedGraph(n);
            for (int i = 0; i < m; i++) {
                int v = in.nextInt() - 1, u = in.nextInt() - 1;
                long w = in.nextLong();
                graph[v].add(new GraphPair(u, w));
                if (!directed)
                    graph[u].add(new GraphPair(v, w));
            }
            return graph;
        }
 
        double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
 
        String nextLine() throws IOException {
            return br.readLine();
        }
 
        boolean hasNextLine() throws IOException {
            return br.ready();
        }
    }
 
    private void run() throws IOException {
        in = new FastScanner(System.in); // new FastScanner(new FileInputStream(".in"));
        out = new PrintWriter(System.out); // new PrintWriter(new FileOutputStream(".out"));
 
        for (int t = multitests ? in.nextInt() : 1; t-- > 0; )
            solve();
 
        out.flush();
        out.close();
    }
 
    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}