The Squareland national forest is divided into equal 1 × 1 square plots aligned with north-south and east-west directions. Each plot can be uniquely described by integer Cartesian coordinates (x, y) of its south-west corner.

Three friends, Alice, Bob, and Charlie are going to buy three distinct plots of land A, B, C in the forest. Initially, all plots in the forest (including the plots A, B, C) are covered by trees. The friends want to visit each other, so they want to clean some of the plots from trees. After cleaning, one should be able to reach any of the plots A, B, C from any other one of those by moving through adjacent cleared plots. Two plots are adjacent if they share a side.

<image> For example, A=(0,0), B=(1,1), C=(2,2). The minimal number of plots to be cleared is 5. One of the ways to do it is shown with the gray color.

Of course, the friends don't want to strain too much. Help them find out the smallest number of plots they need to clean from trees.

Input

The first line contains two integers x_A and y_A — coordinates of the plot A (0 ≤ x_A, y_A ≤ 1000). The following two lines describe coordinates (x_B, y_B) and (x_C, y_C) of plots B and C respectively in the same format (0 ≤ x_B, y_B, x_C, y_C ≤ 1000). It is guaranteed that all three plots are distinct.

Output

On the first line print a single integer k — the smallest number of plots needed to be cleaned from trees. The following k lines should contain coordinates of all plots needed to be cleaned. All k plots should be distinct. You can output the plots in any order.

If there are multiple solutions, print any of them.

Examples

Input


0 0
1 1
2 2


Output


5
0 0
1 0
1 1
1 2
2 2


Input


0 0
2 0
1 1


Output


4
0 0
1 0
1 1
2 0

Note

The first example is shown on the picture in the legend.

The second example is illustrated with the following image:

<image>
//package com.company;

import java.io.*;
import java.math.BigInteger;
import java.util.*;

import static java.lang.Math.*;

public class Main {
    FastScanner in;
    PrintWriter out;

    class Pair implements Comparable<Pair> {
        int x;
        int y;

        Pair(int i, int j) {
            x = i;
            y = j;
        }

        @Override
        public boolean equals(Object o) {
            if (this == o)
                return true;
            if (o == null || getClass() != o.getClass())
                return false;
            Pair p = (Pair) o;
            return (x == p.x && y == p.y);
        }

        @Override
        public int compareTo(Pair that) {
            if (x == that.x) {
                return Double.compare(y, that.y);
            }
            return Double.compare(x, that.x);
        }
    }

    int m2 = 29;
    long p = 1773676287;
    long q = 1537872671;
    long[] pow1;
    long[] pow2;
    long[][] hash;

    /*long getHash(int l, int r){
        if(r - l < 0){
            return 0;
        }
        if(l == 0){
            return hash[r];
        }
        return ((hash[r] - hash[l - 1] * pow[r - l + 1])%p + p)%p;
    }*/

    /*int binS(int c1, int cl2, int len){
        int l = 0, r = len + 1;
        while(r - l > 1){
            int m = (r + l)/2;
            if(getHash(c1 - m, c1 + m) == getHash(cl2 - m, cl2 + m)){
                l = m;
            } else {
                r = m;
            }
        }
        return l;
    }

    int binS2(int c1, int cl2, int len){
        int l = 0, r = len + 1;
        while(r - l > 1){
            int m = (r + l)/2;
            if(getHash(c1 - m, c1 + m - 1) == getHash(cl2 - m + 1, cl2 + m)){
                l = m;
            } else {
                r = m;
            }
        }
        return l;
    }*/



    /*private void solve() throws IOException {
        int n = in.nextInt(), m = in.nextInt();
        hash = new long[n + 1][m + 1];
        hash[0][0] = 0;
        pow1 = new long[n];
        pow2 = new  long[m];
        pow1[0] = 1;
        pow2[0] = 1;
        for(int i = 0; i < n; i++){
            pow1[i] = (pow1[i - 1] * m)%p;
        }
        for(int i = 0; i < m; i++){
            pow2[i] = (pow2[i - 1] * m)
        }
        for(int i = 1; i < 2*n + 1; i++){
            hash[i] = (hash[i - 1] * m + s[i] - 'a' + 1)%p;
            pow[i] = (pow[i - 1] * m) % p;
        }
        int b = s.length;
        long ans = 0;
        for(int i =0; i < n; i++) {
            int res = binS(i, 2*n - i, Math.min(i, n - i - 1)) + 1;
            //out.print(res + " ");
            ans += res;
            res = binS2(i, 2*n - i, Math.min(i, n - i));
            ans += res;
            //out.print(res + " ");
            //out.println();
        }
        out.print(ans);
    }*/

    long[] max;
    long[] am;
    long ans;
    ArrayList<Integer> g[];
    void dfs(int v){
        for(int i : g[v]){
            dfs(i);
            max[v] = max(max[v], max[i]);
        }
        if(am[v] == 0){
            long max1 = 0, max2 = 0;
            for(int i : g[v]){
                if(max[i] > max1){
                    max2 = max1;
                    max1 = max[i];
                } else if(max[i] > max2){
                    max2 = max[i];
                }
            }
            if(max1 + max2 != max1){
                am[v] = max1 + max2;
            }
        }
        max[v] = max(max[v], am[v]);
        ans += am[v];
    }

    class Node{
        int l, r;
        char op;
        int val;
        int ind;
        Node lc, rc;
        Node(int l, int r, int val){
            this.l = l;
            this.r = r;
            this.val = val;
        }
    }

    Node change(Node cur, int pos, char a){
        if(cur.l == cur.r){
            cur.val = (int)(a - '0');
            return cur;
        }
        if(cur.ind == pos){
            cur.op = a;
            cur.val = op(cur.lc.val, cur.op, cur.rc.val);
            return cur;
        }
        if(pos <= cur.ind){
            cur.lc = change(cur.lc, pos, a);
        } else {
            cur.rc = change(cur.rc, pos, a);
        }
        cur.val = op(cur.lc.val, cur.op, cur.rc.val);
        return cur;
    }

    int op(int a, char c, int b){
        if(c == '&'){
            return a & b;
        }
        if(c == '|'){
            return a | b;
        }
        if(c == '^'){
            return a^b;
        }
        return 0;
    }

    /*private void solveB() throws IOException {
        char[] a = in.next().toCharArray();
        int n = a.length;
        Stack<Node> a1 = new Stack<>();
        Stack<Character> ops = new Stack<>();
        Stack<Integer> ind = new Stack<>();
        Stack<Integer> beg = new Stack<>();
        int cnt = 0;
        Node last = null;
        for(int i = 0; i < n; i++){
            if(a[i] == '('){
                beg.add(i);
            } else if(a[i] == ')'){
                int u = ops.pop() - '0';
                ind.pop();
                char d = ops.pop();
                int cind = ind.pop();
                int v = ops.pop() - '0';
                ind.pop();
                Node tmp1 = new Node(beg.pop(), i, op(u, d, v));
                ops.add(Integer.toString(tmp1.val).charAt(0));
                if(!a1.empty()) {
                    Node tmp = a1.pop();
                    Node tmp2 = a1.pop();
                    tmp1.lc = tmp2;
                    tmp1.rc = tmp;
                    tmp1.op = d;
                    tmp1.ind = cind;
                }
                ind.add(tmp1.ind);
                a1.add(tmp1);
            } else if(a[i] == '1' || a[i] == '0'){
                ops.add(a[i]);
                ind.add(i);
                Node tmp1 = new Node(i, i, a[i] - '0');
                a1.add(tmp1);
            } else {
                ops.add(a[i]);
                ind.add(i);
            }
        }
        if(ops.size() != 1){
            int u = ops.pop() - '0';
            ind.pop();
            char d = ops.pop();
            int cind = ind.pop();
            int v = ops.pop() - '0';
            ind.pop();
            Node tmp1 = new Node(0, n - 1, op(u, d, v));
            ops.add((char) tmp1.val);
            if(!a1.empty()) {
                Node tmp = a1.pop();
                Node tmp2 = a1.pop();
                tmp1.lc = tmp2;
                tmp1.rc = tmp;
                tmp1.op = d;
                tmp1.ind = cind;
            }
            last = tmp1;
        } else {
            last = a1.pop();
        }
        out.print(last.val);
        int m = in.nextInt();
        for(int i = 0; i < m; i++){
            last = change(last, in.nextInt() - 1, in.next().charAt(0));
            out.print(last.val);
        }

    }*/
    int n, m;
    long[] a, b;
    private void solveD() throws IOException{
        Pair[] a = new Pair[3];
        for(int i = 0; i < 3; i++){
            a[i] = new Pair(in.nextInt(), in.nextInt());
        }
        Arrays.sort(a);
        TreeSet<Pair> answ = new TreeSet<>();
        if(a[0].y <= a[1].y && a[1].y >= a[2].y){
            for(int i = a[0].x; i <= a[1].x; i++){
                answ.add(new Pair(i, a[0].y));
            }
            for(int i = a[0].y; i <= a[1].y; i++){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = a[1].y - 1; i >= a[2].y; i--){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = a[1].x + 1; i <= a[2].x; i++){
                answ.add(new Pair(i, a[2].y));
            }
        } else if(a[0].y >= a[1].y && a[1].y <= a[2].y){
            for(int i = a[0].x; i <= a[1].x; i++){
                answ.add(new Pair(i, a[0].y));
            }
            for(int i = a[0].y; i >= a[1].y; i--){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = a[1].y + 1; i <= a[2].y; i++){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = a[1].x + 1; i <= a[2].x; i++){
                answ.add(new Pair(i, a[2].y));
            }
        } else {
            for(int i = a[0].x; i <= a[1].x; i++){
                answ.add(new Pair(i, a[0].y));
            }
            for(int i = min(a[0].y, a[1].y); i <= max(a[1].y, a[0].y); i++){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = min(a[1].y, a[2].y); i <= max(a[1].y, a[2].y); i++){
                answ.add(new Pair(a[1].x, i));
            }
            for(int i = a[1].x + 1; i <= a[2].x; i++){
                answ.add(new Pair(i, a[2].y));
            }
        }
        out.println(answ.size());
        for(Pair i : answ){
            out.println(i.x + " " + i.y);
        }
    }

    private void solvecup() throws IOException {
        int n = in.nextInt();
        double sum = in.nextDouble();
        g = new ArrayList[n];
        for(int i = 0; i < n; i++){
            g[i] = new ArrayList<>();
        }
        for(int i = 0; i < n - 1; i++){
            int a = in.nextInt() -1 , b = in.nextInt() - 1;
            g[a].add(b);
            g[b].add(a);
        }
        int am = 0;
        for(int i = 0; i < n; i++){
            if(g[i].size() == 1){
               am++;
            }
        }
        out.print((sum/am)*2);
    }



    class FastScanner {
        StringTokenizer st;
        BufferedReader br;
        FastScanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }
        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());
        }
        long nextLong() throws IOException {
            return Long.parseLong(next());
        }
        double nextDouble() throws IOException {
            return Double.parseDouble(next().replace(',', '.'));
        }
        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"));
        solveD();
        out.flush();
        out.close();
    }
    public static void main(String[] args) throws IOException {
        new Main().run();
    }
}