/*
[ C O D E    T I L L    I N F I N I T Y ]
//#include <emmintrin.h>
*/
#include <set>
#include <map>
#include <list>
#include <ctime>
#include <deque>
#include <queue>
#include <bitset>
#include <vector>
#include <list>
#include <stack>
#include <random>
#include <string>
#include <numeric>
#include <utility>
#include <iterator>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstring>
#include <cstdio>
#if !defined Header_DR
#define Header_DR
#pragma warning(disable:4996)
#define intt long long
#define cin user_input
#define cout output
#define PI 3.14159265358979323846l
#define code_jam 0
#define code_chef 0
#define rep(i,a,b) for(long long i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ve vector
#define pb push_back
#define srt(x) sort(x.begin(),x.end())
#define mod static_cast<long long> (1000000007)
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define endl "\n"
#endif
#ifdef _WIN32
#define getcx _getchar_nolock
#endif
#ifdef __unix__
#define getcx getchar_unlocked
#endif
#ifdef __APPLE__
#define getcx getchar_unlocked
#endif
#if!defined FAST_IO
#undef cin
#undef cout
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define cin user_input
#define cout output
#endif
using namespace std;
namespace Xrocks {}
using namespace Xrocks;
namespace Xrocks
{
    class in {}user_input;
    class out {}output;
    in& operator >> (in& X, int &Y)
    {
        scanf("%d", &Y);
        return X;
    }
    in& operator >> (in& X, char *Y)
    {
        scanf("%s", Y);
        return X;
    }
    in& operator >> (in& X, float &Y)
    {
        scanf("%f", &Y);
        return X;
    }
    in& operator >> (in& X, double &Y)
    {
        scanf("%lf", &Y);
        return X;
    }
    in& operator >> (in& X, char &C)
    {
        scanf("%c", &C);
        return X;
    }
    in& operator >> (in& X, string &Y)
    {
#undef cin
        cin >> Y;
#define cin user_input
        return X;
    }
    in& operator >> (in& X, long long &Y)
    {
        scanf("%lld", &Y);
        return X;
    }
    template<typename T>
    in& operator >> (in& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cin >> x;
        return X;
    }

    template<typename T>
    out& operator << (out& X, const  T &Y)
    {
#undef cout
        cout << Y;
#define cout output
        return X;
    }
    template<typename T>
    out& operator << (out& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cout << x << " ";
        return X;
    }
    out& operator <<(out& X, const int &Y)
    {
        printf("%d", Y);
        return X;
    }
    out& operator <<(out& X, const char &C)
    {
        printf("%c", C);
        return X;
    }
    out& operator <<(out& X, const string &Y)
    {
        printf("%s", Y.c_str());
        return X;
    }
    out& operator <<(out& X, const long long &Y)
    {
        printf("%lld", Y);
        return X;
    }
    out& operator <<(out& X, const float &Y)
    {
        printf("%f", Y);
        return X;
    }
    out& operator <<(out& X, const double &Y)
    {
        printf("%lf", Y);
        return X;
    }
    out& operator <<(out& X, const char Y[])
    {
        printf("%s", Y);
        return X;
    }
    template<typename T>
    T max(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T max(T A, T B, args... S)
    {
        return max(A > B ? A : B, S...);
    }
    template<typename T>
    T min(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T min(T A, T B, args... S)
    {
        return min(A < B ? A : B, S...);
    }
    template<typename T>
    void vectorize(int y, ve<T> &A)
    {
        A.resize(y);
    }
    template<typename T, typename... args>
    void vectorize(int y, ve<T> &A, args&&... S)
    {
        A.resize(y);
        vectorize(y, S...);
    }
    long long fast(long long a, long long b, long long pr)
    {
        if (b == 0)
            return 1 % pr;
        long long ans = 1 % pr;
        while (b)
        {
            if (b & 1)
                ans = (ans * a) % pr;
            b >>= 1;
            a = (a * a) % pr;
        }
        return ans;
    }
    int readInt()
    {
        int n = 0;
        //    scanf("%d", &n);
        //    return n;
        int ch = getcx();
        int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readLong()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readBin()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '1') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '1')
            n = (n << 1) + (ch - '0'), ch = getcx();
        return n;
    }
    long long inv_(long long val, long long pr = mod)
    {
        return fast(val, pr - 2, pr);
    }
}
// x,y
pair<int, int> operator+(const pair<int, int> &a,const pair<int, int> &b)
{
    return { (a.first + b.first)%mod,(a.second + b.second)%mod };
}
int P[1001][1001];
class solve
{
public:
    solve()
	{
		long long a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		cout << (max({a,c,e})-min({a,c,e})+max({b,d,f})-min({b,d,f})+1) << endl;
		pair<int,int> p[3];
		p[0]={a,b};
		p[1]={c,d};
		p[2]={e,f};
		sort(p,p+3);

		for(int i=0;i<=p[1].first;i++)
		{
			P[p[0].first+i][p[0].second]=1;
		}
		int cx=p[1].first,cy=p[0].second;
		if(p[1].second>=p[0].second && p[2].second>=p[0].second)
		{
			if(p[1].second<=p[2].second)
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				while(cx<=p[2].first)
				{
					 P[cx][cy]=1;
					++cx;
				}
			}
			else
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				int cxt=cx;
				while(cx<=p[2].first)
				{
					P[cx][cy]=1;
					++cx;
				}
				cx=cxt;
				while(cy<=p[1].second)
				{
					P[cx][cy]=1;
					++cy;
				}
			}
		}
		else
			if(p[1].second<=p[0].second && p[2].second<=p[0].second)
			{
				if(p[1].second>=p[2].second)
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						 P[cx][cy]=1;
						++cx;
					}
				}
				else
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					int cxt=cx;
					while(cx<=p[2].first)
					{
						P[cx][cy]=1;
						++cx;
					}
					cx=cxt;
					while(cy>=p[1].second)
					{
						P[cx][cy]=1;
						--cy;
					}
				}
			}
			else
			{
				while(cx<=p[2].first)
					P[cx][cy]=1,++cx;
				cx=p[1].first;
				int cyt=cy;
				if(cy<p[1].second)
					while(cy<=p[1].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[1].second)
					P[cx][cy]=1,--cy;
				cy=cyt;
				if(cy<p[2].second)
					while(cy<=p[2].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[2].second)
							P[cx][cy]=1,--cy;
			}
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						cout << i <<" " << j <<"\n";
					}
				}
			}
	}

};
int32_t main()
{
    int t = 1, i = 1;
    //freopen("C:\\Users\\Xenor\\Downloads\\B.in","r",stdin);
    //freopen("C:\\Users\\Xenor\\Downloads\\gb2.txt","w",stdout);
    if (code_chef || code_jam )
        scanf("%d", &t);
    while (t--)
    {
        if (code_jam)
            printf("Case #%d: ", i++);
        new solve;
    }
#ifdef __unix__
    cout << "\n";
#endif
    return 0;
}


/*
[ C O D E    T I L L    I N F I N I T Y ]
//#include <emmintrin.h>
*/
#include <set>
#include <map>
#include <list>
#include <ctime>
#include <deque>
#include <queue>
#include <bitset>
#include <vector>
#include <list>
#include <stack>
#include <random>
#include <string>
#include <numeric>
#include <utility>
#include <iterator>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstring>
#include <cstdio>
#if !defined Header_DR
#define Header_DR
#pragma warning(disable:4996)
#define intt long long
#define cin user_input
#define cout output
#define PI 3.14159265358979323846l
#define code_jam 0
#define code_chef 0
#define rep(i,a,b) for(long long i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ve vector
#define pb push_back
#define srt(x) sort(x.begin(),x.end())
#define mod static_cast<long long> (1000000007)
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define endl "\n"
#endif
#ifdef _WIN32
#define getcx _getchar_nolock
#endif
#ifdef __unix__
#define getcx getchar_unlocked
#endif
#ifdef __APPLE__
#define getcx getchar_unlocked
#endif
#if!defined FAST_IO
#undef cin
#undef cout
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define cin user_input
#define cout output
#endif
using namespace std;
namespace Xrocks {}
using namespace Xrocks;
namespace Xrocks
{
    class in {}user_input;
    class out {}output;
    in& operator >> (in& X, int &Y)
    {
        scanf("%d", &Y);
        return X;
    }
    in& operator >> (in& X, char *Y)
    {
        scanf("%s", Y);
        return X;
    }
    in& operator >> (in& X, float &Y)
    {
        scanf("%f", &Y);
        return X;
    }
    in& operator >> (in& X, double &Y)
    {
        scanf("%lf", &Y);
        return X;
    }
    in& operator >> (in& X, char &C)
    {
        scanf("%c", &C);
        return X;
    }
    in& operator >> (in& X, string &Y)
    {
#undef cin
        cin >> Y;
#define cin user_input
        return X;
    }
    in& operator >> (in& X, long long &Y)
    {
        scanf("%lld", &Y);
        return X;
    }
    template<typename T>
    in& operator >> (in& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cin >> x;
        return X;
    }

    template<typename T>
    out& operator << (out& X, const  T &Y)
    {
#undef cout
        cout << Y;
#define cout output
        return X;
    }
    template<typename T>
    out& operator << (out& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cout << x << " ";
        return X;
    }
    out& operator <<(out& X, const int &Y)
    {
        printf("%d", Y);
        return X;
    }
    out& operator <<(out& X, const char &C)
    {
        printf("%c", C);
        return X;
    }
    out& operator <<(out& X, const string &Y)
    {
        printf("%s", Y.c_str());
        return X;
    }
    out& operator <<(out& X, const long long &Y)
    {
        printf("%lld", Y);
        return X;
    }
    out& operator <<(out& X, const float &Y)
    {
        printf("%f", Y);
        return X;
    }
    out& operator <<(out& X, const double &Y)
    {
        printf("%lf", Y);
        return X;
    }
    out& operator <<(out& X, const char Y[])
    {
        printf("%s", Y);
        return X;
    }
    template<typename T>
    T max(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T max(T A, T B, args... S)
    {
        return max(A > B ? A : B, S...);
    }
    template<typename T>
    T min(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T min(T A, T B, args... S)
    {
        return min(A < B ? A : B, S...);
    }
    template<typename T>
    void vectorize(int y, ve<T> &A)
    {
        A.resize(y);
    }
    template<typename T, typename... args>
    void vectorize(int y, ve<T> &A, args&&... S)
    {
        A.resize(y);
        vectorize(y, S...);
    }
    long long fast(long long a, long long b, long long pr)
    {
        if (b == 0)
            return 1 % pr;
        long long ans = 1 % pr;
        while (b)
        {
            if (b & 1)
                ans = (ans * a) % pr;
            b >>= 1;
            a = (a * a) % pr;
        }
        return ans;
    }
    int readInt()
    {
        int n = 0;
        //    scanf("%d", &n);
        //    return n;
        int ch = getcx();
        int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readLong()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readBin()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '1') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '1')
            n = (n << 1) + (ch - '0'), ch = getcx();
        return n;
    }
    long long inv_(long long val, long long pr = mod)
    {
        return fast(val, pr - 2, pr);
    }
}
// x,y
pair<int, int> operator+(const pair<int, int> &a,const pair<int, int> &b)
{
    return { (a.first + b.first)%mod,(a.second + b.second)%mod };
}
int P[1001][1001];
class solve
{
public:
    solve()
	{
		long long a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		cout << (max({a,c,e})-min({a,c,e})+max({b,d,f})-min({b,d,f})+1) << endl;
		pair<int,int> p[3];
		p[0]={a,b};
		p[1]={c,d};
		p[2]={e,f};
		sort(p,p+3);

		for(int i=p[0].first;i<=p[1].first;i++)
		{
			P[i][p[0].second]=1;
		}
		int cx=p[1].first,cy=p[0].second;
		if(p[1].second>=p[0].second && p[2].second>=p[0].second)
		{
			if(p[1].second<=p[2].second)
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				while(cx<=p[2].first)
				{
					 P[cx][cy]=1;
					++cx;
				}
			}
			else
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				int cxt=cx;
				while(cx<=p[2].first)
				{
					P[cx][cy]=1;
					++cx;
				}
				cx=cxt;
				while(cy<=p[1].second)
				{
					P[cx][cy]=1;
					++cy;
				}
			}
		}
		else
			if(p[1].second<=p[0].second && p[2].second<=p[0].second)
			{
				if(p[1].second>=p[2].second)
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						 P[cx][cy]=1;
						++cx;
					}
				}
				else
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					int cxt=cx;
					while(cx<=p[2].first)
					{
						P[cx][cy]=1;
						++cx;
					}
					cx=cxt;
					while(cy>=p[1].second)
					{
						P[cx][cy]=1;
						--cy;
					}
				}
			}
			else
			{
				while(cx<=p[2].first)
					P[cx][cy]=1,++cx;
				cx=p[1].first;
				int cyt=cy;
				if(cy<p[1].second)
					while(cy<=p[1].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[1].second)
					P[cx][cy]=1,--cy;
				cy=cyt;
				if(cy<p[2].second)
					while(cy<=p[2].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[2].second)
							P[cx][cy]=1,--cy;
			}
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						cout << i <<" " << j <<"\n";
					}
				}
			}
	}

};
int32_t main()
{
    int t = 1, i = 1;
    //freopen("C:\\Users\\Xenor\\Downloads\\B.in","r",stdin);
    //freopen("C:\\Users\\Xenor\\Downloads\\gb2.txt","w",stdout);
    if (code_chef || code_jam )
        scanf("%d", &t);
    while (t--)
    {
        if (code_jam)
            printf("Case #%d: ", i++);
        new solve;
    }
#ifdef __unix__
    cout << "\n";
#endif
    return 0;
}


/*
[ C O D E    T I L L    I N F I N I T Y ]
//#include <emmintrin.h>
*/
#include <set>
#include <map>
#include <list>
#include <ctime>
#include <deque>
#include <queue>
#include <bitset>
#include <vector>
#include <list>
#include <stack>
#include <random>
#include <string>
#include <numeric>
#include <utility>
#include <iterator>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstring>
#include <cstdio>
#if !defined Header_DR
#define Header_DR
#pragma warning(disable:4996)
#define intt long long
#define cin user_input
#define cout output
#define PI 3.14159265358979323846l
#define code_jam 0
#define code_chef 0
#define rep(i,a,b) for(long long i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ve vector
#define pb push_back
#define srt(x) sort(x.begin(),x.end())
#define mod static_cast<long long> (1000000007)
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define endl "\n"
#endif
#ifdef _WIN32
#define getcx _getchar_nolock
#endif
#ifdef __unix__
#define getcx getchar_unlocked
#endif
#ifdef __APPLE__
#define getcx getchar_unlocked
#endif
#if!defined FAST_IO
#undef cin
#undef cout
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define cin user_input
#define cout output
#endif
using namespace std;
namespace Xrocks {}
using namespace Xrocks;
namespace Xrocks
{
    class in {}user_input;
    class out {}output;
    in& operator >> (in& X, int &Y)
    {
        scanf("%d", &Y);
        return X;
    }
    in& operator >> (in& X, char *Y)
    {
        scanf("%s", Y);
        return X;
    }
    in& operator >> (in& X, float &Y)
    {
        scanf("%f", &Y);
        return X;
    }
    in& operator >> (in& X, double &Y)
    {
        scanf("%lf", &Y);
        return X;
    }
    in& operator >> (in& X, char &C)
    {
        scanf("%c", &C);
        return X;
    }
    in& operator >> (in& X, string &Y)
    {
#undef cin
        cin >> Y;
#define cin user_input
        return X;
    }
    in& operator >> (in& X, long long &Y)
    {
        scanf("%lld", &Y);
        return X;
    }
    template<typename T>
    in& operator >> (in& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cin >> x;
        return X;
    }

    template<typename T>
    out& operator << (out& X, const  T &Y)
    {
#undef cout
        cout << Y;
#define cout output
        return X;
    }
    template<typename T>
    out& operator << (out& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cout << x << " ";
        return X;
    }
    out& operator <<(out& X, const int &Y)
    {
        printf("%d", Y);
        return X;
    }
    out& operator <<(out& X, const char &C)
    {
        printf("%c", C);
        return X;
    }
    out& operator <<(out& X, const string &Y)
    {
        printf("%s", Y.c_str());
        return X;
    }
    out& operator <<(out& X, const long long &Y)
    {
        printf("%lld", Y);
        return X;
    }
    out& operator <<(out& X, const float &Y)
    {
        printf("%f", Y);
        return X;
    }
    out& operator <<(out& X, const double &Y)
    {
        printf("%lf", Y);
        return X;
    }
    out& operator <<(out& X, const char Y[])
    {
        printf("%s", Y);
        return X;
    }
    template<typename T>
    T max(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T max(T A, T B, args... S)
    {
        return max(A > B ? A : B, S...);
    }
    template<typename T>
    T min(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T min(T A, T B, args... S)
    {
        return min(A < B ? A : B, S...);
    }
    template<typename T>
    void vectorize(int y, ve<T> &A)
    {
        A.resize(y);
    }
    template<typename T, typename... args>
    void vectorize(int y, ve<T> &A, args&&... S)
    {
        A.resize(y);
        vectorize(y, S...);
    }
    long long fast(long long a, long long b, long long pr)
    {
        if (b == 0)
            return 1 % pr;
        long long ans = 1 % pr;
        while (b)
        {
            if (b & 1)
                ans = (ans * a) % pr;
            b >>= 1;
            a = (a * a) % pr;
        }
        return ans;
    }
    int readInt()
    {
        int n = 0;
        //    scanf("%d", &n);
        //    return n;
        int ch = getcx();
        int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readLong()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readBin()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '1') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '1')
            n = (n << 1) + (ch - '0'), ch = getcx();
        return n;
    }
    long long inv_(long long val, long long pr = mod)
    {
        return fast(val, pr - 2, pr);
    }
}
// x,y
pair<int, int> operator+(const pair<int, int> &a,const pair<int, int> &b)
{
    return { (a.first + b.first)%mod,(a.second + b.second)%mod };
}
int P[1001][1001];
class solve
{
public:
    solve()
	{
		long long a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		cout << (max({a,c,e})-min({a,c,e})+max({b,d,f})-min({b,d,f})+1) << endl;
		pair<int,int> p[3];
		p[0]={a,b};
		p[1]={c,d};
		p[2]={e,f};
		sort(p,p+3);

		for(int i=p[0].first;i<=p[1].first;i++)
		{
			P[i][p[0].second]=1;
		}
		int cx=p[1].first,cy=p[0].second;
		if(p[1].second>=p[0].second && p[2].second>=p[0].second)
		{
			if(p[1].second<=p[2].second)
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				while(cx<=p[2].first)
				{
					 P[cx][cy]=1;
					++cx;
				}
			}
			else
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				int cxt=cx;
				while(cx<=p[2].first)
				{
					P[cx][cy]=1;
					++cx;
				}
				cx=cxt;
				while(cy<=p[1].second)
				{
					P[cx][cy]=1;
					++cy;
				}
			}
		}
		else
			if(p[1].second<=p[0].second && p[2].second<=p[0].second)
			{
				if(p[1].second>=p[2].second)
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						 P[cx][cy]=1;
						++cx;
					}
				}
				else
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					int cxt=cx;
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						P[cx][cy]=1;
						++cx;
					}
					cx=cxt;
					while(cy>=p[1].second)
					{
						P[cx][cy]=1;
						--cy;
					}
				}
			}
			else
			{
				while(cx<=p[2].first)
					P[cx][cy]=1,++cx;
				cx=p[1].first;
				int cyt=cy;
				if(cy<p[1].second)
					while(cy<=p[1].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[1].second)
					P[cx][cy]=1,--cy;
				cy=cyt;
				if(cy<p[2].second)
					while(cy<=p[2].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[2].second)
							P[cx][cy]=1,--cy;
			}
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						cout << i <<" " << j <<"\n";
					}
				}
			}
	}

};
int32_t main()
{
    int t = 1, i = 1;
    //freopen("C:\\Users\\Xenor\\Downloads\\B.in","r",stdin);
    //freopen("C:\\Users\\Xenor\\Downloads\\gb2.txt","w",stdout);
    if (code_chef || code_jam )
        scanf("%d", &t);
    while (t--)
    {
        if (code_jam)
            printf("Case #%d: ", i++);
        new solve;
    }
#ifdef __unix__
    cout << "\n";
#endif
    return 0;
}


/*
[ C O D E    T I L L    I N F I N I T Y ]
//#include <emmintrin.h>
*/
#include <set>
#include <map>
#include <list>
#include <ctime>
#include <deque>
#include <queue>
#include <bitset>
#include <vector>
#include <list>
#include <stack>
#include <random>
#include <string>
#include <numeric>
#include <utility>
#include <iterator>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstring>
#include <cstdio>
#if !defined Header_DR
#define Header_DR
#pragma warning(disable:4996)
#define intt long long
#define cin user_input
#define cout output
#define PI 3.14159265358979323846l
#define code_jam 0
#define code_chef 0
#define rep(i,a,b) for(long long i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ve vector
#define pb push_back
#define srt(x) sort(x.begin(),x.end())
#define mod static_cast<long long> (1000000007)
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define endl "\n"
#endif
#ifdef _WIN32
#define getcx _getchar_nolock
#endif
#ifdef __unix__
#define getcx getchar_unlocked
#endif
#ifdef __APPLE__
#define getcx getchar_unlocked
#endif
#if!defined FAST_IO
#undef cin
#undef cout
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define cin user_input
#define cout output
#endif
using namespace std;
namespace Xrocks {}
using namespace Xrocks;
namespace Xrocks
{
    class in {}user_input;
    class out {}output;
    in& operator >> (in& X, int &Y)
    {
        scanf("%d", &Y);
        return X;
    }
    in& operator >> (in& X, char *Y)
    {
        scanf("%s", Y);
        return X;
    }
    in& operator >> (in& X, float &Y)
    {
        scanf("%f", &Y);
        return X;
    }
    in& operator >> (in& X, double &Y)
    {
        scanf("%lf", &Y);
        return X;
    }
    in& operator >> (in& X, char &C)
    {
        scanf("%c", &C);
        return X;
    }
    in& operator >> (in& X, string &Y)
    {
#undef cin
        cin >> Y;
#define cin user_input
        return X;
    }
    in& operator >> (in& X, long long &Y)
    {
        scanf("%lld", &Y);
        return X;
    }
    template<typename T>
    in& operator >> (in& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cin >> x;
        return X;
    }

    template<typename T>
    out& operator << (out& X, const  T &Y)
    {
#undef cout
        cout << Y;
#define cout output
        return X;
    }
    template<typename T>
    out& operator << (out& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cout << x << " ";
        return X;
    }
    out& operator <<(out& X, const int &Y)
    {
        printf("%d", Y);
        return X;
    }
    out& operator <<(out& X, const char &C)
    {
        printf("%c", C);
        return X;
    }
    out& operator <<(out& X, const string &Y)
    {
        printf("%s", Y.c_str());
        return X;
    }
    out& operator <<(out& X, const long long &Y)
    {
        printf("%lld", Y);
        return X;
    }
    out& operator <<(out& X, const float &Y)
    {
        printf("%f", Y);
        return X;
    }
    out& operator <<(out& X, const double &Y)
    {
        printf("%lf", Y);
        return X;
    }
    out& operator <<(out& X, const char Y[])
    {
        printf("%s", Y);
        return X;
    }
    template<typename T>
    T max(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T max(T A, T B, args... S)
    {
        return max(A > B ? A : B, S...);
    }
    template<typename T>
    T min(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T min(T A, T B, args... S)
    {
        return min(A < B ? A : B, S...);
    }
    template<typename T>
    void vectorize(int y, ve<T> &A)
    {
        A.resize(y);
    }
    template<typename T, typename... args>
    void vectorize(int y, ve<T> &A, args&&... S)
    {
        A.resize(y);
        vectorize(y, S...);
    }
    long long fast(long long a, long long b, long long pr)
    {
        if (b == 0)
            return 1 % pr;
        long long ans = 1 % pr;
        while (b)
        {
            if (b & 1)
                ans = (ans * a) % pr;
            b >>= 1;
            a = (a * a) % pr;
        }
        return ans;
    }
    int readInt()
    {
        int n = 0;
        //    scanf("%d", &n);
        //    return n;
        int ch = getcx();
        int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readLong()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readBin()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '1') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '1')
            n = (n << 1) + (ch - '0'), ch = getcx();
        return n;
    }
    long long inv_(long long val, long long pr = mod)
    {
        return fast(val, pr - 2, pr);
    }
}
// x,y
pair<int, int> operator+(const pair<int, int> &a,const pair<int, int> &b)
{
    return { (a.first + b.first)%mod,(a.second + b.second)%mod };
}
int P[1001][1001];
class solve
{
public:
    solve()
	{
		long long a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		pair<int,int> p[3];
		p[0]={a,b};
		p[1]={c,d};
		p[2]={e,f};
		sort(p,p+3);

		for(int i=p[0].first;i<=p[1].first;i++)
		{
			P[i][p[0].second]=1;
		}
		int cx=p[1].first,cy=p[0].second;
		if(p[1].second>=p[0].second && p[2].second>=p[0].second)
		{
			if(p[1].second<=p[2].second)
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				while(cx<=p[2].first)
				{
					 P[cx][cy]=1;
					++cx;
				}
			}
			else
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				int cxt=cx;
				while(cx<=p[2].first)
				{
					P[cx][cy]=1;
					++cx;
				}
				cx=cxt;
				while(cy<=p[1].second)
				{
					P[cx][cy]=1;
					++cy;
				}
			}
		}
		else
			if(p[1].second<=p[0].second && p[2].second<=p[0].second)
			{
				if(p[1].second>=p[2].second)
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						 P[cx][cy]=1;
						++cx;
					}
				}
				else
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					int cxt=cx;
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						P[cx][cy]=1;
						++cx;
					}
					cx=cxt;
					while(cy>=p[1].second)
					{
						P[cx][cy]=1;
						--cy;
					}
				}
			}
			else
			{
				while(cx<=p[2].first)
					P[cx][cy]=1,++cx;
				cx=p[1].first;
				int cyt=cy;
				if(cy<p[1].second)
					while(cy<=p[1].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[1].second)
					P[cx][cy]=1,--cy;
				cy=cyt;
				if(cy<p[2].second)
					while(cy<=p[2].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[2].second)
							P[cx][cy]=1,--cy;
			}
			int cnt=0;
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						++cnt;
					}
				}
			}
			cout << cnt << endl;
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						cout << i <<" " << j <<"\n";
					}
				}
			}
	}

};
int32_t main()
{
    int t = 1, i = 1;
    //freopen("C:\\Users\\Xenor\\Downloads\\B.in","r",stdin);
    //freopen("C:\\Users\\Xenor\\Downloads\\gb2.txt","w",stdout);
    if (code_chef || code_jam )
        scanf("%d", &t);
    while (t--)
    {
        if (code_jam)
            printf("Case #%d: ", i++);
        new solve;
    }
#ifdef __unix__
    cout << "\n";
#endif
    return 0;
}


/*
[ C O D E    T I L L    I N F I N I T Y ]
//#include <emmintrin.h>
*/
#include <set>
#include <map>
#include <list>
#include <ctime>
#include <deque>
#include <queue>
#include <bitset>
#include <vector>
#include <list>
#include <stack>
#include <random>
#include <string>
#include <numeric>
#include <utility>
#include <iterator>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <algorithm>
#include <functional>
#include <unordered_map>
#include <unordered_set>
#include <cmath>
#include <cstring>
#include <cstdio>
#if !defined Header_DR
#define Header_DR
#pragma warning(disable:4996)
#define intt long long
#define cin user_input
#define cout output
#define PI 3.14159265358979323846l
#define code_jam 0
#define code_chef 0
#define rep(i,a,b) for(long long i=a;i<b;i++)
#define all(v) v.begin(),v.end()
#define ve vector
#define pb push_back
#define srt(x) sort(x.begin(),x.end())
#define mod static_cast<long long> (1000000007)
#define sumx(x) accumulate(x.begin(),x.end(),0LL)
#define endl "\n"
#endif
#ifdef _WIN32
#define getcx _getchar_nolock
#endif
#ifdef __unix__
#define getcx getchar_unlocked
#endif
#ifdef __APPLE__
#define getcx getchar_unlocked
#endif
#if!defined FAST_IO
#undef cin
#undef cout
#define FAST_IO ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
#define cin user_input
#define cout output
#endif
using namespace std;
namespace Xrocks {}
using namespace Xrocks;
namespace Xrocks
{
    class in {}user_input;
    class out {}output;
    in& operator >> (in& X, int &Y)
    {
        scanf("%d", &Y);
        return X;
    }
    in& operator >> (in& X, char *Y)
    {
        scanf("%s", Y);
        return X;
    }
    in& operator >> (in& X, float &Y)
    {
        scanf("%f", &Y);
        return X;
    }
    in& operator >> (in& X, double &Y)
    {
        scanf("%lf", &Y);
        return X;
    }
    in& operator >> (in& X, char &C)
    {
        scanf("%c", &C);
        return X;
    }
    in& operator >> (in& X, string &Y)
    {
#undef cin
        cin >> Y;
#define cin user_input
        return X;
    }
    in& operator >> (in& X, long long &Y)
    {
        scanf("%lld", &Y);
        return X;
    }
    template<typename T>
    in& operator >> (in& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cin >> x;
        return X;
    }

    template<typename T>
    out& operator << (out& X, const  T &Y)
    {
#undef cout
        cout << Y;
#define cout output
        return X;
    }
    template<typename T>
    out& operator << (out& X, vector<T> &Y)
    {
        for (auto &x : Y)
            cout << x << " ";
        return X;
    }
    out& operator <<(out& X, const int &Y)
    {
        printf("%d", Y);
        return X;
    }
    out& operator <<(out& X, const char &C)
    {
        printf("%c", C);
        return X;
    }
    out& operator <<(out& X, const string &Y)
    {
        printf("%s", Y.c_str());
        return X;
    }
    out& operator <<(out& X, const long long &Y)
    {
        printf("%lld", Y);
        return X;
    }
    out& operator <<(out& X, const float &Y)
    {
        printf("%f", Y);
        return X;
    }
    out& operator <<(out& X, const double &Y)
    {
        printf("%lf", Y);
        return X;
    }
    out& operator <<(out& X, const char Y[])
    {
        printf("%s", Y);
        return X;
    }
    template<typename T>
    T max(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T max(T A, T B, args... S)
    {
        return max(A > B ? A : B, S...);
    }
    template<typename T>
    T min(T A)
    {
        return A;
    }
    template<typename T, typename... args>
    T min(T A, T B, args... S)
    {
        return min(A < B ? A : B, S...);
    }
    template<typename T>
    void vectorize(int y, ve<T> &A)
    {
        A.resize(y);
    }
    template<typename T, typename... args>
    void vectorize(int y, ve<T> &A, args&&... S)
    {
        A.resize(y);
        vectorize(y, S...);
    }
    long long fast(long long a, long long b, long long pr)
    {
        if (b == 0)
            return 1 % pr;
        long long ans = 1 % pr;
        while (b)
        {
            if (b & 1)
                ans = (ans * a) % pr;
            b >>= 1;
            a = (a * a) % pr;
        }
        return ans;
    }
    int readInt()
    {
        int n = 0;
        //    scanf("%d", &n);
        //    return n;
        int ch = getcx();
        int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readLong()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '9') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '9')
            n = (n << 3) + (n << 1) + ch - '0', ch = getcx();
        n = n * sign;
        return n;
    }
    long long readBin()
    {
        long long n = 0;
        //scanf("%lld",&n);
        //return n;
        int ch = getcx(); int sign = 1;
        while (ch < '0' || ch > '1') { if (ch == '-')sign = -1; ch = getcx(); }

        while (ch >= '0' && ch <= '1')
            n = (n << 1) + (ch - '0'), ch = getcx();
        return n;
    }
    long long inv_(long long val, long long pr = mod)
    {
        return fast(val, pr - 2, pr);
    }
}
// x,y
pair<int, int> operator+(const pair<int, int> &a,const pair<int, int> &b)
{
    return { (a.first + b.first)%mod,(a.second + b.second)%mod };
}
int P[1001][1001];
class solve
{
public:
    solve()
	{
		long long a,b,c,d,e,f;
		cin >> a >> b >> c >> d >> e >> f;
		pair<int,int> p[3];
		p[0]={a,b};
		p[1]={c,d};
		p[2]={e,f};
		sort(p,p+3);

		for(int i=p[0].first;i<=p[1].first;i++)
		{
			P[i][p[0].second]=1;
		}
		int cx=p[1].first,cy=p[0].second;
		if(p[1].second>=p[0].second && p[2].second>=p[0].second)
		{
			if(p[1].second<=p[2].second)
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				while(cx<=p[2].first)
				{
					 P[cx][cy]=1;
					++cx;
				}
			}
			else
			{
				while(cy<=p[2].second)
				{
					P[cx][cy]=1;
					cy++;
				}
				cy=p[2].second;
				int cxt=cx;
				while(cx<=p[2].first)
				{
					P[cx][cy]=1;
					++cx;
				}
				cx=cxt;
				while(cy<=p[1].second)
				{
					P[cx][cy]=1;
					++cy;
				}
			}
		}
		else
			if(p[1].second<=p[0].second && p[2].second<=p[0].second)
			{
				if(p[1].second>=p[2].second)
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						 P[cx][cy]=1;
						++cx;
					}
				}
				else
				{
					while(cy>=p[2].second)
					{
						P[cx][cy]=1;
						cy--;
					}
					int cxt=cx;
					cy=p[2].second;
					while(cx<=p[2].first)
					{
						P[cx][cy]=1;
						++cx;
					}
					cx=cxt;
					while(cy>=p[1].second)
					{
						P[cx][cy]=1;
						--cy;
					}
				}
			}
			else
			{
				while(cx<=p[2].first)
					P[cx][cy]=1,++cx;
				cx=p[1].first;
				int cyt=cy;
				if(cy<p[1].second)
					while(cy<=p[1].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[1].second)
					P[cx][cy]=1,--cy;
				cy=cyt;
				cx=p[2].first;
				if(cy<p[2].second)
					while(cy<=p[2].second)
						P[cx][cy]=1,++cy;
					else
						while(cy>=p[2].second)
							P[cx][cy]=1,--cy;
			}
			int cnt=0;
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						++cnt;
					}
				}
			}
			cout << cnt << endl;
			for(int i=0;i<=1000;i++)
			{
				for(int j=0;j<=1000;j++)
				{
					if(P[i][j])
					{
						cout << i <<" " << j <<"\n";
					}
				}
			}
	}

};
int32_t main()
{
    int t = 1, i = 1;
    //freopen("C:\\Users\\Xenor\\Downloads\\B.in","r",stdin);
    //freopen("C:\\Users\\Xenor\\Downloads\\gb2.txt","w",stdout);
    if (code_chef || code_jam )
        scanf("%d", &t);
    while (t--)
    {
        if (code_jam)
            printf("Case #%d: ", i++);
        new solve;
    }
#ifdef __unix__
    cout << "\n";
#endif
    return 0;
}


#include<bits/stdc++.h>
using namespace std ;

int n = 3 ;
pair < int , int > a[ 5 ] ;
vector < pair < int , int > > v ;

void input ( ) {
    for ( int i = 1 ; i <= n ; ++ i ) {
        scanf ( "%d%d" , &a[ i ].first , &a[ i ].second ) ;
    }
    sort ( a + 1 , a + n + 1 ) ;
}

void solve ( ) {
    for ( int i = a[ 1 ].first ; i < a[ 2 ].first ; ++ i ) {
        v.push_back ( { i , a[ 1 ].second } ) ;
    }
    int st = min ( a[ 1 ].second , a[ 2 ].second ) ;
    st = min ( st , a[ 3 ].second ) ;

    int en = max ( a[ 1 ].second , a[ 2 ].second ) ;
    en = max ( en , a[ 3 ].second ) ;
    for ( int i = st ; i <= en ; ++ i ) {
        v.push_back ( { a[ 2 ].first , i } ) ;
    }
    for ( int i = a[ 2 ].first + 1 ; i <= a[ 3 ].first ; ++ i ) {
        v.push_back ( { i , a[ 3 ].second } ) ;
    }
    int sz = v.size ( ) ;
    printf ( "%d\n" , sz ) ;
    for ( int i = 0 ; i < sz ; ++ i ) {
        printf ( "%d %d\n" , v[ i ].first , v[ i ].second ) ;
    }
}

int main ( ) {
    ios_base :: sync_with_stdio ( false ) ;
    cin.tie ( NULL ) ;
    input ( ) ;
    solve ( ) ;
    return 0 ;
}


#include <bits/stdc++.h>
#pragma GCC optimize 03
using namespace std;

int mind = LONG_MAX, minx = 0, miny = 0;

void outp(int x1, int y1, int x2, int y2) {
	if (x1 > x2) {
		int n = x1;
		x1 = x2;
		x2 = n;
		n = y1;
		y1 = y2;
		y2 = n;
	}
	for (int i = x1 + 1; i < x2; i++) {
		cout << i << " " << y1 << endl;
	}
	if (y1 < y2) {
		if (x1 == x2) y1++;
		for (int i = y1; i < y2; i++) {
			cout << x2 << " " << i << endl;
		}
	}
	else {
		if (x1 == x2) y1--;
		for (int i = y1; i > y2; i--) {
			cout << x2 << " " << i << endl;
		}
	}
}

void outp2(int x1, int y1, int x2, int y2, int x3, int y3) {
	if (x1 > x2) {
		int n = x1;
		x1 = x2;
		x2 = n;
		n = y1;
		y1 = y2;
		y2 = n;
	}

	if (abs(x2 - x3) + abs(y2 - y3) < abs(x1 - x3) + abs(y1 - y3)) {
		mind = abs(x2 - x3) + abs(y2 - y3);
		minx = x2;
		miny = y2;
	}
	else {
		mind = abs(x1 - x3) + abs(y1 - y3);
		minx = x1;
		miny = y1;
	}

	for (int i = x1 + 1; i < x2; i++) {
		cout << i << " " << y1 << endl;
		if (abs(i - x3) + abs(y1 - y3) < mind) {
			mind = abs(i - x3) + abs(y1 - y3);
			minx = i;
			miny = y1;
		}
	}
	if (y1 < y2) {
		if (x1 == x2) y1++;
		for (int i = y1; i < y2; i++) {
			cout << x2 << " " << i << endl;
			if (abs(x2 - x3) + abs(i - y3) < mind) {
				mind = abs(x2 - x3) + abs(i - y3);
				minx = x2;
				miny = i;
			}
		}
	}
	else {
		if (x1 == x2) y1--;
		for (int i = y1; i > y2; i--) {
			cout << x2 << " " << i << endl;
			if (abs(x2 - x3) + abs(i - y3) < mind) {
				mind = abs(x2 - x3) + abs(i - y3);
				minx = x2;
				miny = i;
			}
		}
	}
	outp(minx, miny, x3, y3);
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int x1, x2, x3, y1, y2, y3;
	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
	if (x1 > x3) {
		int n = x1;
		x1 = x3;
		x3 = n;
		n = y1;
		y1 = y3;
		y3 = n;
	}
	if (x2 > x3) {
		int n = x2;
		x2 = x3;
		x3 = n;
		n = y2;
		y2 = y3;
		y3 = n;
	}
	cout << max(max(x1, x2), x3) - min(min(x1, x2), x3) + max(max(y1, y2), y3) - min(min(y1, y2), y3) + 1 << endl;
	cout << x1 << " " << y1 << endl;
	cout << x2 << " " << y2 << endl;
	cout << x3 << " " << y3 << endl;
	if ((x3 - x1) * (x3 - x2) <= 0 && (y3 - y1) * (y3 - y2) <= 0) {
		outp(x1, y1, x3, y3);
		outp(x2, y2, x3, y3);
	}
	else {
		outp2(x1, y1, x2, y2, x3, y3);
	}
}


#include <bits/stdc++.h>
#pragma GCC optimize 03
using namespace std;

int mind = LONG_MAX, minx = 0, miny = 0;

void outp(int x1, int y1, int x2, int y2) {
	if (x1 > x2) {
		int n = x1;
		x1 = x2;
		x2 = n;
		n = y1;
		y1 = y2;
		y2 = n;
	}
	for (int i = x1 + 1; i < x2; i++) {
		cout << i << " " << y1 << endl;
	}
	if (y1 < y2) {
		if (x1 == x2) y1++;
		for (int i = y1; i < y2; i++) {
			cout << x2 << " " << i << endl;
		}
	}
	else {
		if (x1 == x2) y1--;
		for (int i = y1; i > y2; i--) {
			cout << x2 << " " << i << endl;
		}
	}
}

void outp2(int x1, int y1, int x2, int y2, int x3, int y3) {
	if (x1 > x2) {
		int n = x1;
		x1 = x2;
		x2 = n;
		n = y1;
		y1 = y2;
		y2 = n;
	}

	if (abs(x2 - x3) + abs(y2 - y3) < abs(x1 - x3) + abs(y1 - y3)) {
		mind = abs(x2 - x3) + abs(y2 - y3);
		minx = x2;
		miny = y2;
	}
	else {
		mind = abs(x1 - x3) + abs(y1 - y3);
		minx = x1;
		miny = y1;
	}

	for (int i = x1 + 1; i < x2; i++) {
		cout << i << " " << y1 << endl;
		if (abs(i - x3) + abs(y1 - y3) < mind) {
			mind = abs(i - x3) + abs(y1 - y3);
			minx = i;
			miny = y1;
		}
	}
	if (y1 < y2)
		for (int i = y1; i < y2; i++) {
			cout << x2 << " " << i << endl;
			if (abs(x2 - x3) + abs(i - y3) < mind) {
				mind = abs(x2 - x3) + abs(i - y3);
				minx = x2;
				miny = i;
			}
		}
	else
		for (int i = y1; i > y2; i--) {
			cout << x2 << " " << i << endl;
			if (abs(x2 - x3) + abs(i - y3) < mind) {
				mind = abs(x2 - x3) + abs(i - y3);
				minx = x2;
				miny = i;
			}
		}
	outp(minx, miny, x3, y3);
}

int main() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);
	int x1, x2, x3, y1, y2, y3;
	cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3;
	cout << max(max(x1, x2), x3) - min(min(x1, x2), x3) + max(max(y1, y2), y3) - min(min(y1, y2), y3) + 1 << endl;
	cout << x1 << " " << y1 << endl;
	cout << x2 << " " << y2 << endl;
	cout << x3 << " " << y3 << endl;
	if ((x3 - x1) * (x3 - x2) <= 0 && (y3 - y1) * (y3 - y2) <= 0) {
		outp(x1, y1, x3, y3);
		outp(x2, y2, x3, y3);
	}
	else {
		outp2(x1, y1, x2, y2, x3, y3);
	}
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <limits>
#include <algorithm>
#include <array>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <functional>
#include <numeric>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <unordered_map>
#include <random>
#include <cmath>
#include <complex>
// #include "utiltime.hpp"

using namespace std;

typedef long long int ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef complex<double> cdouble;

const int INFL = (int)1e9;
const ll INFLL = (ll)1e18;
const double INFD = numeric_limits<double>::infinity();
const double PI = 3.14159265358979323846;
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loopll(i, n) for(ll i = 0; i < (ll)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopll1(i, n) for(ll i = 1; i <= (ll)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Looprll(i, n) for(ll i = (ll)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
#define Looprll1(i, n) for(ll i = (ll)n; i >= 1; i--)
#define Foreach(buf, container) for(auto buf : container)
#define Loopdiag(i, j, h, w, sum) for(int i = ((sum) >= h ? h - 1 : (sum)), j = (sum) - i; i >= 0 && j < w; i--, j++)
#define Loopdiagr(i, j, h, w, sum) for(int j = ((sum) >= w ? w - 1 : (sum)), i = (sum) - j; j >= 0 && i < h; j--, i++)
#define Loopdiagsym(i, j, h, w, gap) for (int i = ((gap) >= 0 ? (gap) : 0), j = i - (gap); i < (h) && j < (w); i++, j++)
#define Loopdiagsymr(i, j, h, w, gap) for (int i = ((gap) > (h) - (w) - 1 ? (h) - 1 : (w) - 1 + (gap)), j = i - (gap); i >= 0 && j >= 0; i--, j--)
#define Loopitr(itr, container) for(auto itr = container.begin(); itr != container.end(); itr++)
#define printv(vector) Loop(extra_i, vector.size()) { cout << vector[extra_i] << " "; } cout << endl;
#define printmx(matrix) Loop(extra_i, matrix.size()) { Loop(extra_j, matrix[extra_i].size()) { cout << matrix[extra_i][extra_j] << " "; } cout << endl; }
#define quickio() ios::sync_with_stdio(false); cin.tie(0);
#define readfile(filename) ifstream in(filename); cin.rdbuf(in.rdbuf());
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)
bool nearlyeq(double x, double y) { return abs(x - y) < 1e-9; }
bool inrange(int x, int t) { return x >= 0 && x < t; }
ll rndf(double x) { return (ll)(x + (x >= 0 ? 0.5 : -0.5)); }
ll floorsqrt(double x) { ll m = (ll)sqrt(x); return m + (m * m <= (ll)(x) ? 0 : -1); }
ll ceilsqrt(double x) { ll m = (ll)sqrt(x); return m + ((ll)x <= m * m ? 0 : 1); }
ll rnddiv(ll a, ll b) { return (a / b + (a % b * 2 >= b ? 1 : 0)); }
ll ceildiv(ll a, ll b) { return (a / b + (a % b == 0 ? 0 : 1)); }
ll gcd(ll m, ll n) { if (n == 0) return m; else return gcd(n, m % n); }

/*******************************************************/

vector<vector<bool>> done;

void make_path(int ax, int ay, int cx, int cy) {
	for (int i = ax; i <= cx; i++) {
		done[i][ay] = true;
	}
	for (int i = ax; i >= cx; i--) {
		done[i][ay] = true;
	}
	for (int j = ay; j <= cy; j++) {
		done[cx][j] = true;
	}
	for (int j = ay; j >= cy; j--) {
		done[cx][j] = true;
	}
}

int main() {
	done = vector<vector<bool>>(1001, vector<bool>(1001, false));
	int ax, ay, bx, by, cx, cy;
	cin >> ax >> ay >> bx >> by >> cx >> cy;
	int w = min(ax, bx);
	int e = max(ax, bx);
	int s = min(ay, by);
	int n = max(ay, by);
	if (w <= cx && cx <= e && s <= cy && cy <= n) {
		make_path(ax, ay, cx, cy);
		make_path(cx, cy, bx, by);
	}
	else if (w <= cx && cx <= e && cy <= s) {
		make_path(ax, ay, cx, s);
		make_path(cx, s, cx, cy);
		make_path(cx, s, bx, by);
	}
	else if (w <= cx && cx <= e && n <= cy) {
		make_path(ax, ay, cx, n);
		make_path(cx, n, cx, cy);
		make_path(cx, n, bx, by);
	}
	else if (cx <= w && s <= cy && cy <= n) {
		make_path(ax, ay, w, cy);
		make_path(w, cy, cx, cy);
		make_path(w, cy, bx, by);
	}
	else if (e <= cx && s <= cy && cy <= n) {
		make_path(ax, ay, e, cy);
		make_path(e, cy, cx, cy);
		make_path(e, cy, bx, by);
	}
	else if (cx <= w && cy <= s) {
		make_path(ax, ay, w, s);
		make_path(w, s, cx, cy);
		make_path(w, s, bx, by);
	}
	else if (cx <= w && n <= cy) {
		make_path(ax, ay, w, n);
		make_path(w, n, cx, cy);
		make_path(w, n, bx, by);
	}
	else if (e <= cx && cy <= s) {
		make_path(ax, ay, e, s);
		make_path(e, s, cx, cy);
		make_path(e, s, bx, by);
	}
	else if (e <= cx && n <= cy) {
		make_path(ax, ay, e, n);
		make_path(e, n, cx, cy);
		make_path(e, n, bx, by);
	}
	vector<P> ans;
	Loop(i, 1001) {
		Loop(j, 1001) {
			if (done[i][j]) ans.push_back({ i, j });
		}
	}
	cout << ans.size() << endl;
	Loop(i, ans.size()) cout << ans[i].first << " " << ans[i].second << endl;
}


#include <iostream>
#include <fstream>
#include <iomanip>
#include <climits>
#include <limits>
#include <algorithm>
#include <array>
#include <vector>
#include <deque>
#include <queue>
#include <list>
#include <stack>
#include <string>
#include <functional>
#include <numeric>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <unordered_map>
#include <random>
#include <cmath>
#include <complex>
// #include "utiltime.hpp"

using namespace std;

typedef long long int ll;
typedef vector<int> vi;
typedef vector<vector<int>> vvi;
typedef pair<int, int> P;
typedef pair<ll, ll> Pll;
typedef vector<ll> vll;
typedef vector<vector<ll>> vvll;
typedef complex<double> cdouble;

const int INFL = (int)1e9;
const ll INFLL = (ll)1e18;
const double INFD = numeric_limits<double>::infinity();
const double PI = 3.14159265358979323846;
#define Loop(i, n) for(int i = 0; i < (int)n; i++)
#define Loopll(i, n) for(ll i = 0; i < (ll)n; i++)
#define Loop1(i, n) for(int i = 1; i <= (int)n; i++)
#define Loopll1(i, n) for(ll i = 1; i <= (ll)n; i++)
#define Loopr(i, n) for(int i = (int)n - 1; i >= 0; i--)
#define Looprll(i, n) for(ll i = (ll)n - 1; i >= 0; i--)
#define Loopr1(i, n) for(int i = (int)n; i >= 1; i--)
#define Looprll1(i, n) for(ll i = (ll)n; i >= 1; i--)
#define Foreach(buf, container) for(auto buf : container)
#define Loopdiag(i, j, h, w, sum) for(int i = ((sum) >= h ? h - 1 : (sum)), j = (sum) - i; i >= 0 && j < w; i--, j++)
#define Loopdiagr(i, j, h, w, sum) for(int j = ((sum) >= w ? w - 1 : (sum)), i = (sum) - j; j >= 0 && i < h; j--, i++)
#define Loopdiagsym(i, j, h, w, gap) for (int i = ((gap) >= 0 ? (gap) : 0), j = i - (gap); i < (h) && j < (w); i++, j++)
#define Loopdiagsymr(i, j, h, w, gap) for (int i = ((gap) > (h) - (w) - 1 ? (h) - 1 : (w) - 1 + (gap)), j = i - (gap); i >= 0 && j >= 0; i--, j--)
#define Loopitr(itr, container) for(auto itr = container.begin(); itr != container.end(); itr++)
#define printv(vector) Loop(extra_i, vector.size()) { cout << vector[extra_i] << " "; } cout << endl;
#define printmx(matrix) Loop(extra_i, matrix.size()) { Loop(extra_j, matrix[extra_i].size()) { cout << matrix[extra_i][extra_j] << " "; } cout << endl; }
#define quickio() ios::sync_with_stdio(false); cin.tie(0);
#define readfile(filename) ifstream in(filename); cin.rdbuf(in.rdbuf());
#define bitmanip(m,val) static_cast<bitset<(int)m>>(val)
bool nearlyeq(double x, double y) { return abs(x - y) < 1e-9; }
bool inrange(int x, int t) { return x >= 0 && x < t; }
ll rndf(double x) { return (ll)(x + (x >= 0 ? 0.5 : -0.5)); }
ll floorsqrt(double x) { ll m = (ll)sqrt(x); return m + (m * m <= (ll)(x) ? 0 : -1); }
ll ceilsqrt(double x) { ll m = (ll)sqrt(x); return m + ((ll)x <= m * m ? 0 : 1); }
ll rnddiv(ll a, ll b) { return (a / b + (a % b * 2 >= b ? 1 : 0)); }
ll ceildiv(ll a, ll b) { return (a / b + (a % b == 0 ? 0 : 1)); }
ll gcd(ll m, ll n) { if (n == 0) return m; else return gcd(n, m % n); }

/*******************************************************/

vector<vector<bool>> done;

void make_path(int ax, int ay, int cx, int cy) {
	for (int i = ax; i <= cx; i++) {
		done[i][ay] = true;
	}
	for (int i = ax; i >= cx; i--) {
		done[i][ay] = true;
	}
	for (int j = ay; j <= cy; j++) {
		done[cx][j] = true;
	}
	for (int j = ay; j >= cy; j--) {
		done[cx][j] = true;
	}
}

int main() {
	done = vector<vector<bool>>(1001, vector<bool>(1001, false));
	int ax, ay, bx, by, cx, cy;
	cin >> ax >> ay >> bx >> by >> cx >> cy;
	int w = min(ax, bx);
	int e = max(ax, bx);
	int s = min(ay, by);
	int n = max(ay, by);
	if (w <= cx && cx <= e && s <= cy && cy <= n) {
		make_path(ax, ay, cx, cy);
		make_path(cx, cy, bx, by);
	}
	else if (w <= cx && cx <= e && cy <= s) {
		make_path(ax, ay, cx, s);
		make_path(cx, s, cx, cy);
		make_path(cx, s, bx, by);
	}
	else if (w <= cx && cx <= e && n <= cy) {
		make_path(ax, ay, cx, n);
		make_path(cx, n, cx, cy);
		make_path(cx, n, bx, by);
	}
	else if (cx <= w && s <= cy && cy <= n) {
		make_path(ax, ay, w, cy);
		make_path(w, cy, cx, cy);
		make_path(w, cy, bx, by);
	}
	else if (e <= cx && s <= cy && cy <= n) {
		make_path(ax, ay, e, cy);
		make_path(e, cy, cx, cy);
		make_path(e, cy, bx, by);
	}
	else if (cx <= w && cy <= s) {
		make_path(ax, ay, w, s);
		make_path(w, s, cx, cy);
		make_path(w, s, bx, by);
	}
	else if (cx <= w && n <= cy) {
		make_path(ax, ay, w, n);
		make_path(w, n, cx, cy);
		make_path(w, n, bx, by);
	}
	else if (e <= cx && cy <= s) {
		make_path(ax, ay, e, s);
		make_path(e, s, cx, cy);
		make_path(e, s, bx, by);
	}
	else if (e <= cx && n <= cy) {
		make_path(ax, ay, e, s);
		make_path(e, n, cx, cy);
		make_path(e, n, bx, by);
	}
	vector<P> ans;
	Loop(i, 1001) {
		Loop(j, 1001) {
			if (done[i][j]) ans.push_back({ i, j });
		}
	}
	cout << ans.size() << endl;
	Loop(i, ans.size()) cout << ans[i].first << " " << ans[i].second << endl;
}


#include <bits/stdc++.h>
using namespace std;

template <typename T> T load() { T r; cin >> r; return r; }
template <typename T> vector<T> loadMany(int n) { vector<T> rs(n); generate(rs.begin(), rs.end(), &load<T>); return rs; }

int sgn(int x) { return x < 0 ? -1 : x == 0 ? 0 : 1; }

bool between(int a, int b, int c) {
    if (a > c) swap(a, c);
    return a <= b and b <= c;
}

int goCost(int x1, int y1, int x2, int y2) {
    return abs(x1-x2) + abs(y1-y2) - 1;
}

int rectGoCost(int x1, int y1, int x2, int y2, int x, int y) {
    if (between(x1, x, x2)) return y > y2 ? y - y2 - 1 : y1 - y - 1;
    if (between(y1, y, y2)) return x < x1 ? x1 - x - 1 : x - x2 - 1;
    return min({
        goCost(x1, y1, x, y),
        goCost(x1, y2, x, y),
        goCost(x2, y1, x, y),
        goCost(x2, y2, x, y)
    });
}

vector<pair<int, int>> ans;

void walkInner(int ax, int ay, int bx, int by, int cx, int cy) {
    if (ax > bx) swap(ax, bx), swap(ay, by);
    for (; ax<bx and ax<cx; ++ax)
        ans.emplace_back(ax, ay);
    if (ay <= by) {
        for (; ay<by; ++ay)
            ans.emplace_back(ax, ay);
    } else
        for (; ay>by; --ay)
            ans.emplace_back(ax, ay);
    for (; ax<bx; ++ax)
        ans.emplace_back(ax, ay);
    ans.emplace_back(bx, by);
}

void walkOuter(int x1, int y1, int x2, int y2, int x, int y) {
    if (between(x1, x, x2)) {
        for (; y>y2; --y)
            ans.emplace_back(x, y);
        for (; y<y1; ++y)
            ans.emplace_back(x, y);
    } else if (between(y1, y, y2)) {
        for (; x>x2; --x)
            ans.emplace_back(x, y);
        for (; x<x1; ++x)
            ans.emplace_back(x, y);
    } else {
        auto x0 = x > x1 ? x2 : x1;
        auto y0 = y > y1 ? y2 : y1;
        walkInner(x, y, x0, y0, x0, y0);
    }
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    auto ax = load<int>();
    auto ay = load<int>();
    auto bx = load<int>();
    auto by = load<int>();
    auto cx = load<int>();
    auto cy = load<int>();
    // auto answer = 3 + goCost(ax, ay, bx, by);
    // if (not (between(ax, cx, bx) and between(ay, cy, by)))
        // answer += rectGoCost(min(ax, bx), min(ay, by), max(ax, bx), max(ay, by), cx, cy);
    // cout << answer << '\n';

    walkInner(ax, ay, bx, by, cx, cy);
    if (not (between(ax, cx, bx) and between(ay, cy, by)))
        walkOuter(min(ax, bx), min(ay, by), max(ax, bx), max(ay, by), cx, cy);
    sort(ans.begin(), ans.end());
    ans.erase(unique(ans.begin(), ans.end()), ans.end());
    cout << ans.size() << '\n';
    for (auto pt : ans)
        cout << pt.first << ' ' << pt.second << '\n';
}


#include <bits/stdc++.h>
using namespace std;

template <typename T> T load() { T r; cin >> r; return r; }
template <typename T> vector<T> loadMany(int n) { vector<T> rs(n); generate(rs.begin(), rs.end(), &load<T>); return rs; }

int sgn(int x) { return x < 0 ? -1 : x == 0 ? 0 : 1; }
bool monotonic(int a, int b, int c) { return min(a, c) <= b and b <= max(a, c); }

struct Walk {
    void doInner(int ax, int ay, int bx, int by, int cx, int cy) {
        if (ax > bx)
            swap(ax, bx), swap(ay, by);
        direct(ax, ay, max(ax, min(bx, cx)), ay);
        direct(ax, ay, ax, by);
        direct(ax, ay, bx, by);
    }
    void doOuter(int x1, int y1, int x2, int y2, int x, int y) {
        auto ox = monotonic(x1, x, x2) ? x : x > x2 ? x2 : x1;
        auto oy = monotonic(y1, y, y2) ? y : y > y2 ? y2 : y1;
        direct(x, y, ox, oy);
    }
    void direct(int& x1, int& y1, int x2, int y2) {
        for (; x1<x2; ++x1) add(x1, y1);
        for (; x1>x2; --x1) add(x1, y1);
        for (; y1<y2; ++y1) add(x1, y1);
        for (; y1>y2; --y1) add(x1, y1);
        add(x1, y1);
    }
    void add(int x, int y) {
        tab.emplace_back(x, y);
    }
    void print() {
        sort(tab.begin(), tab.end());
        tab.erase(unique(tab.begin(), tab.end()), tab.end());
        cout << tab.size() << '\n';
        for (auto pt : tab)
            cout << pt.first << ' ' << pt.second << '\n';
    }
    vector<pair<int, int>> tab;
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    auto ax = load<int>();
    auto ay = load<int>();
    auto bx = load<int>();
    auto by = load<int>();
    auto cx = load<int>();
    auto cy = load<int>();
    auto walk = Walk{};
    walk.doInner(ax, ay, bx, by, cx, cy);
    if (not (monotonic(ax, cx, bx) and monotonic(ay, cy, by)))
        walk.doOuter(min(ax, ay), min(ay, by), max(ax, bx), max(ay, by), cx, cy);
    walk.print();
}


#include <bits/stdc++.h>
using namespace std;

template <typename T> T load() { T r; cin >> r; return r; }
template <typename T> vector<T> loadMany(int n) { vector<T> rs(n); generate(rs.begin(), rs.end(), &load<T>); return rs; }

int sgn(int x) { return x < 0 ? -1 : x == 0 ? 0 : 1; }
bool monotonic(int a, int b, int c) { return min(a, c) <= b and b <= max(a, c); }

struct Walk {
    void doInner(int ax, int ay, int bx, int by, int cx, int cy) {
        if (ax > bx)
            swap(ax, bx), swap(ay, by);
        direct(ax, ay, max(ax, min(bx, cx)), ay);
        direct(ax, ay, ax, by);
        direct(ax, ay, bx, by);
    }
    void doOuter(int x1, int y1, int x2, int y2, int x, int y) {
        auto ox = monotonic(x1, x, x2) ? x : x > x2 ? x2 : x1;
        auto oy = monotonic(y1, y, y2) ? y : y > y2 ? y2 : y1;
        direct(x, y, ox, oy);
    }
    void direct(int& x1, int& y1, int x2, int y2) {
        for (; x1<x2; ++x1) add(x1, y1);
        for (; x1>x2; --x1) add(x1, y1);
        for (; y1<y2; ++y1) add(x1, y1);
        for (; y1>y2; --y1) add(x1, y1);
        add(x1, y1);
    }
    void add(int x, int y) {
        tab.emplace_back(x, y);
    }
    void print() {
        sort(tab.begin(), tab.end());
        tab.erase(unique(tab.begin(), tab.end()), tab.end());
        cout << tab.size() << '\n';
        for (auto pt : tab)
            cout << pt.first << ' ' << pt.second << '\n';
    }
    vector<pair<int, int>> tab;
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    auto ax = load<int>();
    auto ay = load<int>();
    auto bx = load<int>();
    auto by = load<int>();
    auto cx = load<int>();
    auto cy = load<int>();
    auto walk = Walk{};
    walk.doInner(ax, ay, bx, by, cx, cy);
    if (not (monotonic(ax, cx, bx) and monotonic(ay, cy, by)))
        walk.doOuter(min(ax, bx), min(ay, by), max(ax, bx), max(ay, by), cx, cy);
    walk.print();
}


#include <bits/stdc++.h>
using namespace std;

template <typename T> T load() { T r; cin >> r; return r; }
template <typename T> vector<T> loadMany(int n) { vector<T> rs(n); generate(rs.begin(), rs.end(), &load<T>); return rs; }

int sgn(int x) { return x < 0 ? -1 : x == 0 ? 0 : 1; }
bool monotonic(int a, int b, int c) { return min(a, c) <= b and b <= max(a, c); }

struct Walk {
    void doInner(int ax, int ay, int bx, int by, int cx, int cy) {
        if (ax > bx)
            swap(ax, bx), swap(ay, by);
        direct(ax, ay, min(bx, cx), ay);
        direct(ax, ay, ax, by);
        direct(ax, ay, bx, by);
    }
    void doOuter(int x1, int y1, int x2, int y2, int x, int y) {
        auto ox = monotonic(x1, x, x2) ? x : x > x2 ? x2 : x1;
        auto oy = monotonic(y1, y, y2) ? y : y > y2 ? y2 : y1;
        direct(x, y, ox, oy);
    }
    void direct(int& x1, int& y1, int x2, int y2) {
        for (; x1<x2; ++x1) add(x1, y1);
        for (; x1>x2; --x1) add(x1, y1);
        for (; y1<y2; ++y1) add(x1, y1);
        for (; y1>y2; --y1) add(x1, y1);
        add(x1, y1);
    }
    void add(int x, int y) {
        tab.emplace_back(x, y);
    }
    void print() {
        sort(tab.begin(), tab.end());
        tab.erase(unique(tab.begin(), tab.end()), tab.end());
        cout << tab.size() << '\n';
        for (auto pt : tab)
            cout << pt.first << ' ' << pt.second << '\n';
    }
    vector<pair<int, int>> tab;
};

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    auto ax = load<int>();
    auto ay = load<int>();
    auto bx = load<int>();
    auto by = load<int>();
    auto cx = load<int>();
    auto cy = load<int>();
    auto walk = Walk{};
    walk.doInner(ax, ay, bx, by, cx, cy);
    if (not (monotonic(ax, cx, bx) and monotonic(ay, cy, by)))
        walk.doOuter(min(ax, ay), min(ay, by), max(ax, bx), max(ay, by), cx, cy);
    walk.print();
}


#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }

const int maxn = 1e6 + 7;

int main() {

    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);

    vector<pair<int,int>> xy(3);
    vector<pair<int,int>> yx(3);

    for (int i = 0; i < 3; i++) {
        cin >> xy[i].first >> xy[i].second;
        yx[i].first = xy[i].second;
        yx[i].second = xy[i].first;
    }

    sort(xy.begin(),xy.end());
    sort(yx.begin(),yx.end());

    set<pair<int,int>> ans;
    for (int x = xy[0].first; x <= xy[2].first; x++) {
        ans.insert({x,yx[1].first});
    }
    for (int y = yx[0].first; y <= yx[1].first; y++) {
        ans.insert({yx[0].second,y});
    }
    for (int y = yx[1].first; y <= yx[2].first; y++) {
        ans.insert({yx[2].second,y});
    }

    int sz = (int)ans.size();
    cout << sz << "\n";
    for (auto p: ans) {
        cout << p.first << " " << p.second << "\n";
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
	#define D(a) cerr << #a << " = " << a << endl
#else
	#define D(a)
	#define cerr false && cerr
#endif
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
#define dforsn(i,s,n) for(int i=int(n-1);i>=int(s);i--)
#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)
#define dforn(i,n) dforsn(i,0,n)
#define forn(i,n) forsn(i,0,n)
#define all(a) a.begin(),a.end()
#define si(a) int((a).size())
#define pb emplace_back
#define mp make_pair
#define snd second
#define fst first
#define endl '\n'
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

const int N = 1e3+1;

struct pto {
    int x, y;
    pto(int _x=0, int _y=0) : x(_x), y(_y) {}
    bool operator < (const pto &p) const { return mp(x,y) < mp(p.x,p.y); }
    bool operator != (const pto &p) const { return mp(x,y) != mp(p.x, p.y); }
};

bool seen[N][N];
vector<pto> colored;

int sign(int x) { return (x > 0) - (x < 0); }

void add(pto p) {
    if (seen[p.x][p.y]) return;
    seen[p.x][p.y] = true;
    colored.pb(p);
}

void movex(pto &a, pto b) {
    while (a.x != b.x) add(a), a.x += sign(b.x - a.x);
}
void movey(pto &a, pto b) {
    while (a.y != b.y) add(a), a.y += sign(b.y - a.y);
}

void go(pto a, pto b, pto c) {
    if (sign(b.x - a.x) == sign(c.x - a.x)) {
        movex(a, b);
        movey(a, b);
    }
    else {
        movey(a, b);
        movex(a, b);
    }

    add(b);
}

int main() {
	fastio;

    pto p[3]; forn(i, 3) cin >> p[i].x >> p[i].y;

    sort(p, p+3);
    forn(i, 2) go(p[i], p[i+1], p[(i+2)%3]);

    cout << si(colored) << endl;
    for (pto c : colored) cout << c.x << ' ' << c.y << endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
	#define D(a) cerr << #a << " = " << a << endl
#else
	#define D(a)
	#define cerr false && cerr
#endif
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
#define dforsn(i,s,n) for(int i=int(n-1);i>=int(s);i--)
#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)
#define dforn(i,n) dforsn(i,0,n)
#define forn(i,n) forsn(i,0,n)
#define all(a) a.begin(),a.end()
#define si(a) int((a).size())
#define pb emplace_back
#define mp make_pair
#define snd second
#define fst first
#define endl '\n'
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

const int N = 1e3+1;

struct pto {
    int x, y;
    pto(int _x=0, int _y=0) : x(_x), y(_y) {}
    bool operator < (const pto &p) const { return mp(x,y) < mp(p.x,p.y); }
    bool operator != (const pto &p) const { return mp(x,y) != mp(p.x, p.y); }
};

bool seen[N][N];
vector<pto> colored;

int sign(int x) { return (x > 0) - (x < 0); }

void add(pto p) {
    if (seen[p.x][p.y]) return;
    seen[p.x][p.y] = true;
    colored.pb(p);
}

void movex(pto &a, pto b) {
    while (a.x != b.x) add(a), a.x += sign(b.x - a.x);
}
void movey(pto &a, pto b) {
    while (a.y != b.y) add(a), a.y += sign(b.y - a.y);
}

int main() {
	fastio;

    pto p[3]; forn(i, 3) cin >> p[i].x >> p[i].y;

    sort(p, p+3);
    movex(p[0], p[1]);
    movey(p[0], p[1]);
    movey(p[1], p[2]);
    movex(p[1], p[2]);
    colored.pb(p[2]);

    cout << si(colored) << endl;
    for (pto c : colored) cout << c.x << ' ' << c.y << endl;

	return 0;
}


#include <bits/stdc++.h>
using namespace std;

#ifdef LOCAL
	#define D(a) cerr << #a << " = " << a << endl
#else
	#define D(a)
	#define cerr false && cerr
#endif
#define fastio ios_base::sync_with_stdio(0); cin.tie(0)
#define dforsn(i,s,n) for(int i=int(n-1);i>=int(s);i--)
#define forsn(i,s,n) for(int i=int(s);i<int(n);i++)
#define dforn(i,n) dforsn(i,0,n)
#define forn(i,n) forsn(i,0,n)
#define all(a) a.begin(),a.end()
#define si(a) int((a).size())
#define pb emplace_back
#define mp make_pair
#define snd second
#define fst first
#define endl '\n'
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef long long ll;

const int N = 1e3+1;

struct pto {
    int x, y;
    pto(int _x=0, int _y=0) : x(_x), y(_y) {}
    bool operator < (const pto &p) const { return mp(x,y) < mp(p.x,p.y); }
    bool operator != (const pto &p) const { return mp(x,y) != mp(p.x, p.y); }
};

bool seen[N][N];
vector<pto> colored;

int sign(int x) { return (x > 0) - (x < 0); }

void add(pto p) {
    if (seen[p.x][p.y]) return;
    seen[p.x][p.y] = true;
    colored.pb(p);
}

void movex(pto &a, pto b) {
    while (a.x != b.x) add(a), a.x += sign(b.x - a.x);
}
void movey(pto &a, pto b) {
    while (a.y != b.y) add(a), a.y += sign(b.y - a.y);
}

int main() {
	fastio;

    pto p[3]; forn(i, 3) cin >> p[i].x >> p[i].y;

    sort(p, p+3);
    movex(p[0], p[1]);
    movey(p[0], p[1]);
    colored.pb(p[1]);
    movex(p[2], p[1]);
    movey(p[2], p[1]);

    cout << si(colored) << endl;
    for (pto c : colored) cout << c.x << ' ' << c.y << endl;

	return 0;
}


//g++ -Wshadow -Wall -O2 -Wno-unused-result -Wno-psabi
#include "bits/stdc++.h"
#define f first
#define s second
#define inf 1e18
#define ll long long
#define mod 1000000007
#define pb emplace_back
#define vll vector<long long int>
#define ull unsigned long long
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) ((long long int)(x).size())
#define mll map<long long int, long long int>
#define pll pair<long long int, long long int>
using namespace std;

ll x1, y_1, x2, y2, x3, y3;

void input(){
	cin >> x1 >> y_1 >> x2 >> y2 >> x3 >> y3;
}

void solve(){
	ll x = (x1+x2+x3)/3, y = (y_1+y2+y3)/3;
	set<pll> s;
	ll tx = x, ty = y;
	while(tx != x1){
		s.insert({tx, ty});
		if(tx > x1)tx--;
		else tx++;
	}
	while(ty != y_1){
		s.insert({tx, ty});
		if(ty > y_1)ty--;
		else ty++;
	}
	tx = x, ty = y;
	while(tx != x2){
		s.insert({tx, ty});
		if(tx > x2)tx--;
		else tx++;
	}
	while(ty != y2){
		s.insert({tx, ty});
		if(ty > y2)ty--;
		else ty++;
	}
	tx = x, ty = y;
	while(tx != x3){
		s.insert({tx, ty});
		if(tx > x3)tx--;
		else tx++;
	}
	while(ty != y3){
		s.insert({tx, ty});
		if(ty > y3)ty--;
		else ty++;
	}
	s.insert({x1, y_1});
	s.insert({x2, y2});
	s.insert({x3, y3});
	cout << sz(s) << endl;
	for(auto it:s)cout << it.f << " " << it.s << endl;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.precision(20);
	ll t = 1;
	//cin >> t;
	while(t--){
		input();
		solve();
        cout<<endl;
	}
	cin.get();
	return 0;
}


//g++ -Wshadow -Wall -O2 -Wno-unused-result -Wno-psabi
#include "bits/stdc++.h"
#define f first
#define s second
#define inf 1e18
#define ll long long
#define mod 1000000007
#define pb emplace_back
#define vll vector<long long int>
#define ull unsigned long long
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(x) ((long long int)(x).size())
#define mll map<long long int, long long int>
#define pll pair<long long int, long long int>
using namespace std;

ll x1, y_1, x2, y2, x3, y3;

void input(){
	cin >> x1 >> y_1 >> x2 >> y2 >> x3 >> y3;
}

void solve(){
	ll a[3] = {x1, x2, x3};
	ll b[3] = {y_1, y2, y3};
	sort(a, a+3);
	sort(b, b+3);
	ll x = a[1], y = b[1];
	set<pll> s;
	ll tx = x, ty = y;
	while(tx != x1){
		s.insert({tx, ty});
		if(tx > x1)tx--;
		else tx++;
	}
	while(ty != y_1){
		s.insert({tx, ty});
		if(ty > y_1)ty--;
		else ty++;
	}
	tx = x, ty = y;
	while(tx != x2){
		s.insert({tx, ty});
		if(tx > x2)tx--;
		else tx++;
	}
	while(ty != y2){
		s.insert({tx, ty});
		if(ty > y2)ty--;
		else ty++;
	}
	tx = x, ty = y;
	while(tx != x3){
		s.insert({tx, ty});
		if(tx > x3)tx--;
		else tx++;
	}
	while(ty != y3){
		s.insert({tx, ty});
		if(ty > y3)ty--;
		else ty++;
	}
	s.insert({x1, y_1});
	s.insert({x2, y2});
	s.insert({x3, y3});
	cout << sz(s) << endl;
	for(auto it:s)cout << it.f << " " << it.s << endl;
}

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cout.precision(20);
	ll t = 1;
	//cin >> t;
	while(t--){
		input();
		solve();
        cout<<endl;
	}
	cin.get();
	return 0;
}


#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 1e5 + 5;
int xa, ya, xb, yb, xc, yc;
int x[3], y[3];
vector< pair<int, int> > ans;
void polacz(int x, int y, int xx, int yy) {
	while(x != xx) {
		if(x < xx) x++;
		else x--;
		ans.pb(mp(x, y));
	}
	while(y != yy) {
		if(y < yy) y++;
		else y--;
		ans.pb(mp(x, y));
	}
}
int main()
{
	scanf("%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xc, &yc);
	x[0] = xa;
	x[1] = xb;
	x[2] = xc;
	y[0] = ya;
	y[1] = yb;
	y[2] = yc;
	sort(x, x + 3);
	sort(y, y + 3);

	ans.pb(mp(x[1], y[1]));
	polacz(x[1], y[1], xa, ya);
	polacz(x[1], y[1], xb, yb);
	polacz(x[1], y[1], xc, yc);

	printf("%d\n", (int)ans.size());
	for(auto p : ans) printf("%d %d\n", p.first, p.second);
	return 0;
}


#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 1e5 + 5;
int xa, xb, xc, ya, yb, yc;
vector< pair<int ,int> > ans;
int main()
{
	scanf("%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xc, &yc);
	if(ya < yb) {
		swap(ya, yb);
		swap(xa, xb);
	}
	if(ya < yc) {
		swap(ya, yc);
		swap(xa, xc);
	}
	if(yb < yc) {
		swap(yc, yb);
		swap(xc, xb);
	}

	while(ya != yb) {
		ans.pb(mp(xa, ya));
		ya--;
	}

	pair<int ,int> stop = mp(xa, ya);
	while(xa != xb) {
		ans.pb(mp(xa, ya));
		if(xa < xb) xa++;
		else xa--;
	}

	//ans.pb(mp(xa, ya));

	if(xc < stop.first && xc < xb) {
		int xx = stop.first;
		if(stop.first > xb) xx = xb;
		xx--;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx--;
		}
		ans.pb(mp(xb, ya));

	}
	else if(xc > stop.first && xc > xb) {
		int xx = stop.first;
		if(stop.first < xb) xx = xb;
		xx++;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx++;
		}
		ans.pb(mp(xb, ya));
	}

	if(ya != yc) ya--;
	while(ya != yc) {
		ans.pb(mp(xc, ya));
		ya--;
	}
	ans.pb(mp(xc, ya));

	printf("%d\n", (int)ans.size());
	for(auto p : ans) printf("%d %d\n", p.first, p.second);

	return 0;
}


#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 1e5 + 5;
int xa, xb, xc, ya, yb, yc;
vector< pair<int ,int> > ans;
int main()
{
	scanf("%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xc, &yc);
	if(ya < yb) {
		swap(ya, yb);
		swap(xa, xb);
	}
	if(ya < yc) {
		swap(ya, yc);
		swap(xa, xc);
	}
	if(yb < yc) {
		swap(yc, yb);
		swap(xc, xb);
	}

	while(ya != yb) {
		ans.pb(mp(xa, ya));
		ya--;
	}

	pair<int ,int> stop = mp(xa, ya);
	while(xa != xb) {
		ans.pb(mp(xa, ya));
		if(xa < xb) xa++;
		else xa--;
	}

	//ans.pb(mp(xa, ya));

	if(xc < stop.first && xc < xb) {
		int xx = stop.first;
		if(stop.first > xb) xx = xb;
		xx--;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx--;
		}
		ans.pb(mp(xb, ya));

	}
	else if(xc > stop.first && xc > xb) {
		int xx = stop.first;
		if(stop.first < xb) xx = xb;
		xx++;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx++;
		}
		ans.pb(mp(xb, ya));
	}

	while(ya != yc) {
		ans.pb(mp(xc, ya));
		ya--;
	}
	ans.pb(mp(xc, ya));

	printf("%d\n", (int)ans.size());
	for(auto p : ans) printf("%d %d\n", p.first, p.second);

	return 0;
}


#define make_pair mp
#define emplace_back pb
#include <bits/stdc++.h>
using namespace std;
mt19937 mt_rand(time(0));
const int N = 1e5 + 5;
int xa, xb, xc, ya, yb, yc;
vector< pair<int ,int> > ans;
int main()
{
	scanf("%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xc, &yc);
	if(ya < yb) {
		swap(ya, yb);
		swap(xa, xb);
	}
	if(ya < yc) {
		swap(ya, yc);
		swap(xa, xc);
	}
	if(yb < yc) {
		swap(yc, yb);
		swap(xc, xb);
	}

	while(ya != yb) {
		ans.pb(mp(xa, ya));
		ya--;
	}

	pair<int ,int> stop = mp(xa, ya);
	while(xa != xb) {
		ans.pb(mp(xa, ya));
		if(xa < xb) xa++;
		else xa--;
	}

	//ans.pb(mp(xa, ya));

	if(xc < stop.first && xc < xb) {
		int xx = stop.first;
		if(stop.first > xb) xx = xb;
		xx--;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx--;
		}
		ans.pb(mp(xb, ya));

	}
	else if(xc > stop.first && xc > xb) {
		int xx = stop.first;
		if(stop.first < xb) xx = xb;
		xx++;
	        while(xx != xc) {
			ans.pb(mp(xb, ya));
			xx++;
		}
		ans.pb(mp(xb, ya));
	}
	else {
		if(ya != yc) ya--;
	}

	while(ya != yc) {
		ans.pb(mp(xc, ya));
		ya--;
	}
	ans.pb(mp(xc, ya));

	printf("%d\n", (int)ans.size());
	for(auto p : ans) printf("%d %d\n", p.first, p.second);

	return 0;
}


#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

#define int long long
#define ull unsigned long long
#define ld long double
#define rep(a) rep1(i,a)
#define rep1(i,a) rep2(i,0,a)
#define rep2(i,b,a) for(int i=(b); i<((int)(a)); i++)
#define rep3(i,b,a) for(int i=(b); i>=((int)(a)); i--)
#define all(a) a.begin(),a.end()
#define pii pair<int,int>
#define pb push_back
#define mp make_pair
#define eps 1e-9
#define sz(a) ((int)a.size())
#define pow2(x) (1ll<<(x))
#define ceiling(a,b) (((a)+(b)-1)/(b))
#define print0(a) cout << (a) << ' '
#define print1(a) cout << (a) << '\n'
#define print2(a,b) cout << (a) << ' ',print1(b)
#define print3(a,b,c) cout << (a) << ' ',print2(b,c)
#define print4(a,b,c,d) cout << (a) << ' ',print3(b,c,d)
#ifdef i_am_noob
#define debug(a) print2(#a,a)
#else
#define debug(a)
#endif
#define ordered_set tree<int,null_type,less<int>,rb_tree_tag,tree_order_statistics_node_update>

using namespace std;
using namespace __gnu_pbds;

const int Mod=1000000007,Mod2=998244353;
const int MOD=Mod;

inline int add(int a, int b){return (a+b>=MOD?a+b-MOD:a+b);}
inline int sub(int a, int b){return (a+MOD-b>=MOD?a-b:a+MOD-b);}
int Pow(int a, int b){
	if(!b) return 1;
	int tmp=Pow(a*a%MOD,b>>1);
	return (b&1?tmp*a%MOD:tmp);
}
inline int inverse(int n){return Pow(n,MOD-2);}

const int maxn=200005;
//i_am_noob
int x[3],y[3],ans=4e18,minx,miny;

inline int dist(int a, int b, int c, int d){return abs(a-c)+abs(b-d);}

signed main(){
	ios_base::sync_with_stdio(0),cin.tie(0);
    rep(3) cin >> x[i] >> y[i];
    rep(1001) rep1(j,1001) if(dist(i,j,x[0],y[0])+dist(i,j,x[1],y[1])+dist(i,j,x[2],y[2])<ans){
        ans=dist(i,j,x[0],y[0])+dist(i,j,x[1],y[1])+dist(i,j,x[2],y[2]);
        minx=i,miny=j;
    }
    print1(ans+1);
    rep(3){
        if(minx>=x[i]) rep2(j,x[i],minx) print2(j,y[i]);
        else rep3(j,x[i],minx+1) print2(j,y[i]);
        if(miny>=y[i]) rep2(j,y[i],miny) print2(minx,j);
        else rep3(j,y[i],miny+1) print2(minx,j);
    }
    print2(minx,miny);
	return 0;
}


/*
❤ QMsh ❤
*/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

struct P
{
    int x, y;
    bool operator <(const P &b) const
    {
        return (x == b.x ? y < b.y : x < b.x);
    }
};

signed main()
{
#ifdef POSPELOV
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
#endif
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    P a[3];
    cin >> a[0].x >> a[0].y >> a[1].x >> a[1].y >> a[2].x >> a[2].y;
    sort(a, a + 3);

    set <P> ans;

    P cur = a[0];
    ans.insert(cur);
    while (cur.x < a[1].x)
    {
        cur.x++;
        ans.insert(cur);
    }
    while (cur.y != a[1].y)
    {
        cur.y += (cur.y < a[1].y ? 1 : -1);
        ans.insert(cur);
    }
    while (cur.y != a[2].y)
    {
        cur.y += (cur.x < a[2].y ? 1 : -1);
        ans.insert(cur);
    }
    while (cur.x < a[2].x)
    {
        cur.x++;
        ans.insert(cur);
    }

    cout << ans.size() << "\n";
    for (P p : ans)
        cout << p.x << " " << p.y << "\n";

    return 0;
}


/*
❤ QMsh ❤
*/

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef long double ld;

struct P
{
    int x, y;
    bool operator <(const P &b) const
    {
        return (x == b.x ? y < b.y : x < b.x);
    }
};

signed main()
{
#ifdef POSPELOV
    freopen("in", "r", stdin);
    freopen("out", "w", stdout);
#endif
    ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
    P a[3];
    cin >> a[0].x >> a[0].y >> a[1].x >> a[1].y >> a[2].x >> a[2].y;
    sort(a, a + 3);

    set <P> ans;

    P cur = a[0];
    ans.insert(cur);
    while (cur.x < a[1].x)
    {
        cur.x++;
        ans.insert(cur);
    }
    while (cur.y != a[1].y)
    {
        cur.y += (cur.y < a[1].y ? 1 : -1);
        ans.insert(cur);
    }
    while (cur.y != a[2].y)
    {
        cur.y += (cur.y < a[2].y ? 1 : -1);
        ans.insert(cur);
    }
    while (cur.x < a[2].x)
    {
        cur.x++;
        ans.insert(cur);
    }

    cout << ans.size() << "\n";
    for (P p : ans)
        cout << p.x << " " << p.y << "\n";

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

using ii = pair<int, int>;
using ll = long long;

#define X first
#define Y second

int n;
vector<ii> G[300007];
ll w[300007];ll res;
ll maxp[300007];

void dfs(int w, int p) {
	maxp[w] = ::w[w];
	int w1  = 0, w2 = 0;
	ll v1 = -1e18, v2 = -1e18;
	for(ii P : G[w]) {
		int u = P.X;
		int c = P.Y;
		if(u == p)
			continue;

		dfs(u, w);

		if(maxp[u] - c >= v1) {
			v2 = v1;
			w2 = w1;
			v1 = maxp[u] - c;
			w1 = u;
		} else if(maxp[u] - c > v2) {
			v2 = maxp[u] - c;
			w2 = u;
		}
	}

	if(w1)
		maxp[w] = max(maxp[w], maxp[w] + v1);

	ll pp = maxp[w];
	if(w1 && w2)
		pp = max(pp, v1 + v2 + ::w[w]);

	res = max(res, pp);
}

int main() {
	scanf("%d", &n);

	for(int i = 1 ; i <= n ; i++)
		scanf("%lld", &w[i]);

	for(int i = 0 ; i < n - 1 ; i++) {
		int u, v, c;
		scanf("%d%d%d", &u, &v, &c);
		G[u].emplace_back(v, c);
		G[v].emplace_back(u, c);
	}

	dfs(1, 0);

	printf("%lld\n", res);

	return 0;
}


#include <bits/stdc++.h>

using namespace std;

int xa, ya, xb, yb, xc, yc;

int dist(int x, int y, int x2, int y2) {
	return abs(x-x2) +abs(y-y2)-1;
}

int sgn(int x) {
	return (x < 0) ? -1 : 1;
}

void plot(int x, int y, int x2, int y2) {
	int dx = sgn(x2-x);
	int dy = sgn(y2-y);

	while(x != x2) {
		x += dx;
		if(x != x2 || y != y2)
		printf("%d %d\n", x, y);
	}

	while(y != y2) {
		y += dy;
		if(y != y2)
			printf("%d %d\n", x, y);
	}
}

int resfor(int x, int y) {
	return dist(x, y, xa, ya) + dist(x, y, xb, yb) + dist(x, y, xc, yc);
}

int main() {
	scanf("%d%d%d%d%d%d", &xa, &ya, &xb, &yb, &xc, &yc);

	int x, y;
	int rr = 1e9;

	for(int xx = 0 ; xx <= 1000 ; xx++)
		for(int yy = 0 ; yy <= 1000 ; yy++)
			if(resfor(xx, yy) < rr) {
				rr = resfor(xx, yy);
				x = xx;
				y = yy;
			}

	vector<int> V;
	V.push_back(dist(xa, ya, xb, yb));
	V.push_back(dist(xc, yc, xb, yb));
	V.push_back(dist(xc, yc, xa, ya));

	sort(V.begin(), V.end());

	if(V[0]  + V[1] + 3 > rr + 4) {
		printf("%d\n", rr + 4);
		printf("%d %d\n", xa, ya);
		printf("%d %d\n", xb, yb);
		printf("%d %d\n", xc, yc);
		printf("%d %d\n", x, y);
		plot(xa, ya, x, y);
		plot(xb, yb, x, y);
		plot(xc, yc, x, y);
	} else {
		printf("%d\n", V[0] + V[1] + 3);
		printf("%d %d\n", xa, ya);
		printf("%d %d\n", xb, yb);
		printf("%d %d\n", xc, yc);
		if(V[2] == dist(xa, ya, xb, yb)) {
			plot(xa, ya, xc, yc);
			plot(xb, yb, xc, yc);
		} else if(V[2] == dist(xa, ya, xc, yc)) {
			plot(xa, ya, xb, yb);
			plot(xb, yb, xc, yc);
		} else {
			plot(xa, ya, xc, yc);
			plot(xb, yb, xa, ya);
		}
	}

	return 0;
}


#include <bits/stdc++.h>
#define maxn 10005

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

vector<PII> ans;

void connect(PII p1, PII p2) {
    for (int x = p1.first + 1; x <= p2.first; ++x) {
        ans.push_back(make_pair(x, p1.second));
    }
    for (int y = p1.second + 1; y <= p2.second; ++y) {
        ans.push_back(make_pair(p2.first, y));
    }

}

int main() {
    int x, y;
    vector<PII> arr;
    cin >> x >> y;
    arr.push_back(make_pair(x, y));
    cin >> x >> y;
    arr.push_back(make_pair(x, y));
    cin >> x >> y;
    arr.push_back(make_pair(x, y));

    sort(arr.begin(), arr.end());

    ans.push_back(arr[0]);
    connect(arr[0], arr[1]);
    int maxY = max(arr[0].second, arr[1].second);
    int minY = min(arr[0].second, arr[1].second);
    if (arr[2].second > maxY) {
        connect(make_pair(arr[1].first, maxY), arr[2]);
    } else if (arr[2].second < minY) {
        connect(make_pair(arr[1].first, minY), arr[2]);
    } else {
        connect(make_pair(arr[1].first, arr[2].second), arr[2]);
    }

    cout << ans.size() << endl;
    for (size_t i = 0; i < ans.size(); ++i) {
        printf ("%i %i\n", ans[i].first, ans[i].second);
    }

    return 0;
}


#include <bits/stdc++.h>
#define maxn 10005

using namespace std;

typedef long long ll;
typedef pair<int, int> PII;

vector<PII> ans;

void connect(PII p1, PII p2) {
    for (int x = p1.first + 1; x <= p2.first; ++x) {
        ans.push_back(make_pair(x, p1.second));
    }
    for (int y = p1.second + 1; y <= p2.second; ++y) {
        ans.push_back(make_pair(p2.first, y));
    }
    for (int y = p1.second - 1; y >= p2.second; --y) {
        ans.push_back(make_pair(p2.first, y));
    }

}

int main() {
    int x, y;
    vector<PII> arr;
    cin >> x >> y;
    arr.push_back(make_pair(x, y));
    cin >> x >> y;
    arr.push_back(make_pair(x, y));
    cin >> x >> y;
    arr.push_back(make_pair(x, y));

    sort(arr.begin(), arr.end());

    ans.push_back(arr[0]);
    connect(arr[0], arr[1]);
    int maxY = max(arr[0].second, arr[1].second);
    int minY = min(arr[0].second, arr[1].second);
    if (arr[2].second > maxY) {
        connect(make_pair(arr[1].first, maxY), arr[2]);
    } else if (arr[2].second < minY) {
        connect(make_pair(arr[1].first, minY), arr[2]);
    } else {
        connect(make_pair(arr[1].first, arr[2].second), arr[2]);
    }

    cout << ans.size() << endl;
    for (size_t i = 0; i < ans.size(); ++i) {
        printf ("%i %i\n", ans[i].first, ans[i].second);
    }

    return 0;
}


#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

template<typename T>
void out(T x) { cout << x << endl; exit(0); }
#define watch(x) cout << (#x) << " is " << (x) << endl

const int maxn = 1005;

int ax,ay,bx,by,cx,cy;

int manhat(int x1,int y1,int x2, int y2) {
  return abs(x1-x2) + abs(y1-y2);
}

map<int, vector<pair<int,int>>> dist2pt;

bool pairsort(pair<int,int> p, pair<int,int> q) {
  int pi = p.first; int pj = p.second;
  int qi = q.first; int qj = q.second;
  vector<int> pd = { manhat(pi,pj,ax,ay),manhat(pi,pj,bx,by),manhat(pi,pj,cx,cy) };
  vector<int> qd = { manhat(qi,qj,ax,ay),manhat(qi,qj,bx,by),manhat(qi,qj,cx,cy) };
  sort(pd.begin(),pd.end());
  sort(qd.begin(),qd.end());

  for (int i=0; i<3; i++) {
    if (pd[i]==qd[i]) continue;
    return pd[i]<qd[i];
  }
  return true;
}

bool viz[maxn][maxn];
vector<pair<int,int>> pts;

void make_path(pair<int,int> meet, int x, int y) {
  int mx=meet.first; int my=meet.second;
  while (x<mx) {
    if (!viz[x][y]) {
      pts.push_back({x,y});
      viz[x][y]=true;
    }
    ++x;
  }
  while (x>mx) {
    if (!viz[x][y]) {
      pts.push_back({x,y});
      viz[x][y]=true;
    }
    --x;
  }
  while (y<my) {
    if (!viz[x][y]) {
      pts.push_back({x,y});
      viz[x][y]=true;
    }
    y++;
  }
  while (y>my) {
    if (!viz[x][y]) {
      pts.push_back({x,y});
      viz[x][y]=true;
    }
    --y;
  }
}

void make_ans(pair<int,int> meet) {
  make_path(meet,ax,ay);
  make_path(meet,bx,by);
  make_path(meet,cx,cy);
}

int main() {
  ios_base::sync_with_stdio(false); cin.tie(0);  cout.tie(0);
  //cout << fixed << setprecision(6);

  cin>>ax>>ay>>bx>>by>>cx>>cy;

  int n = 1+max(ax,max(bx,cx));
  int m = 1+max(ay,max(by,cy));

  for (int i=0; i<n; i++) {
    for (int j=0; j<m; j++) {
      int dist = manhat(ax,ay,i,j)+manhat(bx,by,i,j)+manhat(cx,cy,i,j);
      dist2pt[dist].push_back({i,j});
    }
  }

  vector<pair<int, int>> best = dist2pt.begin()->second;
  sort(best.begin(), best.end(), pairsort);

  pair<int, int> ans = best.front();
  pts.push_back({ans.first,ans.second});
  viz[ans.first][ans.second]=true;

  make_ans(ans);

  if (!viz[ax][ay]) pts.push_back({ax,ay});
  if (!viz[bx][by]) pts.push_back({bx,by});
  if (!viz[cx][cy]) pts.push_back({cx,cy});

  int dst = pts.size();
  cout<<dst<<endl;
  for (auto p: pts) {
    cout<<p.first<<" "<<p.second<<endl;
  }

  return 0;
  //try using ll
  //ur outputting the answer incorrectly
  //try something simpler
}


#include<bits/stdc++.h>

using namespace std;

const int MAXN = 1e3 + 9;

int x[3], y[3], ans = 1e9, ansx, ansy, vis[MAXN][MAXN];

void add(int x, int y) {
	if(!vis[x][y])
		printf("%d %d\n", x, y);
	vis[x][y] = 1;
}

void move(int &cx, int &cy, int dx, int dy) {
	add(cx += dx, cy += dy);
}

int main() {

	for(int i = 0; i < 3; i++)
		cin >> x[i] >> y[i];
	for(int i = 0; i < 3; i++)
		for(int j = 0; j < 3; j++) {
			int x = ::x[i], y = ::y[j], res = 1;
			for(int k = 0; k < 3; k++)
				res += abs(x - ::x[k]) + abs(y - ::y[k]);
			if(res < ans) {
				ans = res;
				ansx = x;
				ansy = y;
			}
		}
	cout << ans << endl;
	for(int i = 0; i < 3; i++) {
		int curx = x[i], cury = y[i];
		add(curx, cury);
		while(curx < ansx)
			move(curx, cury, 1, 0);
		while(curx > ansx)
			move(curx, cury, -1, 0);
		while(cury < ansy)
			move(curx, cury, 0, 1);
		while(cury > ansy)
			move(curx, cury, 0, -1);
	}

	return 0;
}


//author: extraterrestrial_
#include <bits/stdc++.h>
//#pragma GCC optimize("O3,Ofast,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,avx,tune=native")
using namespace std;
//#define int ll
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define _ inline
#define pb push_back
#define F first
#define S second
#define MP make_pair
#define SZ(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pw(x) (1 << (x))
#ifdef extraterrestrial_
#define debug(x) cerr << #x << ": " << x << '\n';
#else
#define debug(x)
#endif
const int INF = 1e9 + 10;
const ll BINF = 1e18 + 10;

const int N = 1010;
bool used[N][N];

void go1(pii from, pii to, vector<pii> &ans) {
  while (from.F != to.F) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.F > to.F) {
      from.F--;
    }
    else {
      from.F++;
    }
  }
  while (from.S != to.S) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.S > to.S) {
      from.S--;
    }
    else {
      from.S++;
    }
  }
  used[to.F][to.S] = true;
}

void go2(pii from, pii to, vector<pii> &ans) {
  while (from.S != to.S) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.S > to.S) {
      from.S--;
    }
    else {
      from.S++;
    }
  }
  while (from.F != to.F) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.F > to.F) {
      from.F--;
    }
    else {
      from.F++;
    }
  }
  used[to.F][to.S] = true;
}

void source() {
  vector<pii> arr(3);
  for (auto &it : arr) {
    cin >> it.F >> it.S;
  }
  sort(all(arr));
  vector<pii> ans;
  if (abs(arr[0].S - arr[1].S) + abs(arr[1].S - arr[2].S) == abs(arr[0].S - arr[2].S)) {
    go1(arr[0], arr[1], ans);
    go1(arr[1], arr[2], ans);
    ans.pb(arr[2]);
  }
  else {
    if (arr[1].S > max(arr[0].S, arr[2].S)) {
      if (arr[0].S <= arr[2].S) {
        go1(arr[0], arr[2], ans);
      }
      else {
        go2(arr[0], arr[2], ans);
      }
      ans.pb(arr[2]);
      while (!used[arr[1].F][arr[1].S]) {
        ans.pb(arr[1]);
        arr[1].S--;
      }
    }
    else {
      if (arr[0].S <= arr[2].S) {
        go2(arr[0], arr[2], ans);
      }
      else {
        go1(arr[0], arr[2], ans);
      }
      ans.pb(arr[2]);
      while (!used[arr[1].F][arr[1].S]) {
        ans.pb(arr[1]);
        arr[1].S++;
      }
    }
  }
  cout << SZ(ans) << '\n';
  for (auto it : ans) {
    cout << it.F << ' ' << it.S << '\n';
  }
}

signed main() {
#ifdef extraterrestrial_
  assert(freopen("input.txt", "r", stdin));
  //assert(freopen("output.txt", "w", stdout));
#else
#define TASK ""
  //assert(freopen(TASK".in", "r", stdin));
  //assert(freopen(TASK".out", "w", stdout));
#endif
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  source();
#ifdef extraterrestrial_
  cerr << "\n\nTIME :: " << clock() * 1.0 / CLOCKS_PER_SEC;
#endif
  return 0;
}


//author: extraterrestrial_
#include <bits/stdc++.h>
//#pragma GCC optimize("O3,Ofast,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,avx,tune=native")
using namespace std;
//#define int ll
typedef long double ld;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define _ inline
#define pb push_back
#define F first
#define S second
#define MP make_pair
#define SZ(x) ((int)x.size())
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define pw(x) (1 << (x))
#ifdef extraterrestrial_
#define debug(x) cerr << #x << ": " << x << '\n';
#else
#define debug(x)
#endif
const int INF = 1e9 + 10;
const ll BINF = 1e18 + 10;

const int N = 1010;
bool used[N][N];

void go2(pii from, pii to, vector<pii> &ans) {
  while (from.F != to.F) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.F > to.F) {
      from.F--;
    }
    else {
      from.F++;
    }
  }
  while (from.S != to.S) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.S > to.S) {
      from.S--;
    }
    else {
      from.S++;
    }
  }
  used[to.F][to.S] = true;
}

void go1(pii from, pii to, vector<pii> &ans) {
  while (from.S != to.S) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.S > to.S) {
      from.S--;
    }
    else {
      from.S++;
    }
  }
  while (from.F != to.F) {
    used[from.F][from.S] = true;
    ans.pb(from);
    if (from.F > to.F) {
      from.F--;
    }
    else {
      from.F++;
    }
  }
  used[to.F][to.S] = true;
}

void source() {
  vector<pii> arr(3);
  for (auto &it : arr) {
    cin >> it.F >> it.S;
  }
  sort(all(arr));
  vector<pii> ans;
  if (abs(arr[0].S - arr[1].S) + abs(arr[1].S - arr[2].S) == abs(arr[0].S - arr[2].S)) {
    go1(arr[0], arr[1], ans);
    go1(arr[1], arr[2], ans);
    ans.pb(arr[2]);
  }
  else {
    if (arr[1].S > max(arr[0].S, arr[2].S)) {
      if (arr[0].S <= arr[2].S) {
        go1(arr[0], arr[2], ans);
      }
      else {
        go2(arr[0], arr[2], ans);
      }
      ans.pb(arr[2]);
      while (!used[arr[1].F][arr[1].S]) {
        ans.pb(arr[1]);
        arr[1].S--;
      }
    }
    else {
      if (arr[0].S <= arr[2].S) {
        go2(arr[0], arr[2], ans);
      }
      else {
        go1(arr[0], arr[2], ans);
      }
      ans.pb(arr[2]);
      while (!used[arr[1].F][arr[1].S]) {
        ans.pb(arr[1]);
        arr[1].S++;
      }
    }
  }
  cout << SZ(ans) << '\n';
  for (auto it : ans) {
    cout << it.F << ' ' << it.S << '\n';
  }
}

signed main() {
#ifdef extraterrestrial_
  assert(freopen("input.txt", "r", stdin));
  //assert(freopen("output.txt", "w", stdout));
#else
#define TASK ""
  //assert(freopen(TASK".in", "r", stdin));
  //assert(freopen(TASK".out", "w", stdout));
#endif
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  source();
#ifdef extraterrestrial_
  cerr << "\n\nTIME :: " << clock() * 1.0 / CLOCKS_PER_SEC;
#endif
  return 0;
}


#include<bits/stdc++.h>
using namespace std;

#define endl '\n'
#define ALL(a)  (a).begin(),(a).end()
#define ALLR(a)  (a).rbegin(),(a).rend()
#define spa << " " <<
#define test cout<<"test"<<endl;
#define fi first
#define se second
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define rep(i,n,m) for(ll i = n; i < (ll)(m); i++)
#define rrep(i,n,m) for(ll i = m - 1; i >= (ll)(n); i--)
using ll = long long;
using ld = long double;
const ll MOD = 1e9+7;
//const ll MOD = 998244353;
const ll INF = 1e18;
using P = pair<ll, ll>;
template<typename T>
void chmin(T &a,T b){if(a>b)a=b;}
template<typename T>
void chmax(T &a,T b){if(a<b)a=b;}
void pmod(ll &a,ll b){a=(a+b)%MOD;}
void pmod(ll &a,ll b,ll c){a=(b+c)%MOD;}
void qmod(ll &a,ll b){a=(a*b)%MOD;}
void qmod(ll &a,ll b,ll c){a=(b*c)%MOD;}
ll median(ll a,ll b, ll c){return a+b+c-max({a,b,c})-min({a,b,c});}
void ans1(bool x){if(x) cout<<"Yes"<<endl;else cout<<"No"<<endl;}
void ans2(bool x){if(x) cout<<"YES"<<endl;else cout<<"NO"<<endl;}
void ans3(bool x){if(x) cout<<"Yay!"<<endl;else cout<<":("<<endl;}
template<typename T1,typename T2>
void ans(bool x,T1 y,T2 z){if(x)cout<<y<<endl;else cout<<z<<endl;}
template<typename T>
void debug(vector<vector<T>>&v,ll h,ll w){for(ll i=0;i<h;i++)
{cout<<v[i][0];for(ll j=1;j<w;j++)cout spa v[i][j];cout<<endl;}};
void debug(vector<string>&v,ll h,ll w){for(ll i=0;i<h;i++)
{for(ll j=0;j<w;j++)cout<<v[i][j];cout<<endl;}};
template<typename T>
void debug(vector<T>&v,ll n){if(n!=0)cout<<v[0];
for(ll i=1;i<n;i++)cout spa v[i];cout<<endl;};
template<typename T>
vector<vector<T>>vec(ll x, ll y, T w){
  vector<vector<T>>v(x,vector<T>(y,w));return v;}
ll gcd(ll x,ll y){ll r;while(y!=0&&(r=x%y)!=0){x=y;y=r;}return y==0?x:y;}
vector<ll>dx={1,0,-1,0,1,1,-1,-1};
vector<ll>dy={0,1,0,-1,1,-1,1,-1};
template<typename T>
vector<T> make_v(size_t a,T b){return vector<T>(a,b);}
template<typename... Ts>
auto make_v(size_t a,Ts... ts){
  return vector<decltype(make_v(ts...))>(a,make_v(ts...));
}

int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  //cout<<fixed<<setprecision(10);
  ll res=0,buf=0;
  bool judge = true;
  vector
a(3);
  rep(i,0,3)cin>>a[i].fi>>a[i].se;
  sort(ALL(a));
  vector
ret;
  ll mx=max(a[0].se,a[1].se),mi=min(a[0].se,a[1].se);
  rep(i,a[0].fi,a[1].fi)ret.EB(i,a[0].se);
  rep(i,mi,mx+1)ret.EB(a[1].fi,i);
  if(a[0].se<=a[2].se&&a[1].se<=a[2].se){
    rep(i,a[1].fi+1,a[2].fi+1)ret.EB(i,mx);
    rep(i,mx+1,a[2].se+1)ret.EB(a[2].fi,i);
  }
  else if(mia[2].se){
    rep(i,a[1].fi+1,a[2].fi+1)ret.EB(i,a[2].se);
  }
  else{
    rep(i,a[1].fi+1,a[2].fi+1)ret.EB(i,mi);
    rep(i,a[2].se,mi)ret.EB(a[2].fi,i);
  }
  cout<<ret.size()<<endl;
  rep(i,0,ret.size())cout<<ret[i].fi spa ret[i].se<<endl;
  return 0;
}


#pragma GCC optimize(2)
#pragma GCC optimize(3)
#pragma GCC optimize(4)
#include<bits/stdc++.h>
using namespace std;
#define y1 y11
#define fi first
#define se second
#define pi acos(-1.0)
#define LL long long
#define mp make_pair
#define pb push_back
#define ls rt<<1, l, m
#define rs rt<<1|1, m+1, r
#define ULL unsigned LL
#define pll pair<LL, LL>
#define pli pair<LL, int>
#define pii pair<int, int>
#define piii pair<pii, int>
#define pdd pair<double, double>
#define ABS(a) (a > 0) ? (a) : -(a)
#define mem(a, b) memset(a, b, sizeof(a))
#define debug(x) cerr << #x << " = " << x << "\n";
#define fio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);

pii a[3];
vector<pii> vc;
int main() {
    for (int i = 0; i < 3; ++i) scanf("%d %d", &a[i].fi, &a[i].se);
    sort(a, a+3);
    vc.pb(a[0]);
    for (int i = 1; i < 3; ++i) {
        int x = a[i-1].fi, y = a[i-1].se;
        while(x < a[i].fi) ++x, vc.pb({x, y});
        while(y < a[i].se) ++y, vc.pb({x, y});
    }
    printf("%d\n", vc.size());
    for (pii p : vc) printf("%d %d\n", p.fi, p.se);
    return 0;
}