#include <bits/stdc++.h>   using namespace std;   int x[3], y[3];   map<pair<int, int>, bool> cleaned;   int cost(int cx, int cy) {     int sum = 0;     for (int i = 0; i < (3); i++)       sum += ((cx - x[i]) > 0 ? (cx - x[i]) : -(cx - x[i])) +              ((cy - y[i]) > 0 ? (cy - y[i]) : -(cy - y[i]));     return sum;   }   void clean(int x1, int y1, int x2, int y2) {     cleaned[pair<int, int>(x1, y1)] = true;     if (x1 == x2 && y1 == y2) return;     if (x1 < x2)       clean(x1 + 1, y1, x2, y2);     else if (x1 > x2)       clean(x1 - 1, y1, x2, y2);     else if (y1 < y2)       clean(x1, y1 + 1, x2, y2);     else       clean(x1, y1 - 1, x2, y2);   }   int main() {     ios_base::sync_with_stdio(false);     int bestX = 0, bestY = 0, bestCost;     for (int i = 0; i < (3); i++) cin >> x[i] >> y[i];     bestCost = cost(0, 0);     for (int ix = 0; ix < (1001); ix++)       for (int iy = 0; iy < (1001); iy++) {         int curCost = cost(ix, iy);         if (curCost < bestCost) {           bestCost = curCost;           bestX = ix;           bestY = iy;         }       }     for (int i = 0; i < (3); i++) clean(x[i], y[i], bestX, bestY);     cout << ((cleaned).size()) << endl;     for (map<pair<int, int>, bool>::iterator it = cleaned.begin();          it != cleaned.end(); ++it) {       cout << it->first.first <<     << it->first.second << endl;     }     return 0;   }   