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

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

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

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

Input

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

Output

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

If there are multiple solutions, print any of them.

Examples

Input


0 0
1 1
2 2


Output


5
0 0
1 0
1 1
1 2
2 2


Input


0 0
2 0
1 1


Output


4
0 0
1 0
1 1
2 0

Note

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

The second example is illustrated with the following image:

<image>
#include <bits/stdc++.h>
using namespace std;
using namespace std::chrono;
struct less_key {
  bool operator()(pair<long long int, pair<long long int, long long int>> p1,
                  pair<long long int, pair<long long int, long long int>> p2) {
    return p1.first < p2.first;
  }
};
const long long int mod = 1000000007ll;
const long long int mod2 = 998244353ll;
const long long int inf = 10000000000000007ll;
const double eps = 1e-10;
template <typename T = long long int, T D = 0>
class MaxOp {
 public:
  static T op(const T& a, const T& b) { return max(a, b); }
  static T def() { return (T)D; }
};
template <typename T = long long int, T D = inf>
class MinOp {
 public:
  static T op(const T& a, const T& b) { return min(a, b); }
  static T def() { return (T)D; }
};
template <typename T = long long int, T D = 0>
class SumOp {
 public:
  static T op(const T& a, const T& b) { return a + b; }
  static T def() { return (T)D; }
};
template <typename D, typename T = long long int>
class SegTree {
 public:
  long long int n;
  vector<T> t;

 private:
  void build(const long long int* a, int v, int tl, int tr) {
    if (tl == tr)
      t[v] = a[tl];
    else {
      int tm = (tl + tr) / 2;
      build(a, v * 2, tl, tm);
      build(a, v * 2 + 1, tm + 1, tr);
      t[v] = D().op(t[v * 2], t[v * 2 + 1]);
    }
  }
  long long int get(int v, int tl, int tr, int l, int r) {
    if (l > r) {
      return D().def();
    }
    if (l == tl && r == tr) {
      return t[v];
    }
    int tm = (tl + tr) / 2;
    return D().op(get(v * 2, tl, tm, l, min(r, tm)),
                  get(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r));
  }
  void update(int v, int tl, int tr, int pos, int new_val) {
    if (tl == tr) {
      t[v] = new_val;
    } else {
      int tm = (tl + tr) / 2;
      if (pos <= tm) {
        update(v * 2, tl, tm, pos, new_val);
      } else {
        update(v * 2 + 1, tm + 1, tr, pos, new_val);
      }
      t[v] = D().op(t[v * 2] + t[v * 2 + 1]);
    }
  }

 public:
  void build(const vector<long long int>& a) {
    n = a.size();
    t.resize(n * 4);
    build(a.data(), 1, 0, n - 1);
  }
  void build(long long int* a, long long int n) {
    this->n = n;
    t.resize(n * 4);
    build(a, 1, 0, n - 1);
  }
  long long int get(long long int l, long long int r) {
    return get(1, 0, n - 1, l, r);
  }
  void update(long long int pos, long long int new_val) {
    update(1, 0, n - 1, pos, new_val);
  }
};
long long int x[5];
long long int y[5];
long long int dx[5];
long long int dy[5];
long long int r[5];
long long int check(long long int lx, long long int ly, long long int x1,
                    long long int y1, long long int x2, long long int y2,
                    long long int& dx, long long int& dy) {
  long long int minx = min(x1, x2);
  long long int maxx = max(x1, x2);
  long long int miny = min(y1, y2);
  long long int maxy = max(y1, y2);
  long long int R = maxy - miny + 1 + maxx - minx + 1 - 1;
  long long int mind = 1000 * 1000 + 7;
  dx = -1;
  dy = -1;
  for (long long int x = minx; x <= maxx; x++) {
    for (long long int y = miny; y <= maxy; y++) {
      long long int d = abs(x - lx) + 1 + abs(y - ly) + 1 - 2;
      if (d < mind) {
        mind = d;
        dx = x;
        dy = y;
      }
    }
  }
  return R + mind;
}
void out(long long int x1, long long int y1, long long int x2, long long int y2,
         set<pair<long long int, long long int>>& R) {
  for (long long int y = min(y1, y2); y <= max(y1, y2); y++) {
    R.insert({x1, y});
  }
  for (long long int x = min(x1, x2); x <= max(x1, x2); x++) {
    R.insert({x, y2});
  }
}
void out(long long int i) {
  set<pair<long long int, long long int>> R;
  out(x[1], y[1], dx[i], dy[i], R);
  out(x[2], y[2], dx[i], dy[i], R);
  out(x[3], y[3], dx[i], dy[i], R);
  cout << R.size() << endl;
  for (auto p : R) {
    cout << p.first << " " << p.second << endl;
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout.precision(15);
  cout.setf(ios::fixed);
  for (long long int i = 1; i <= 3; i++) {
    cin >> x[i] >> y[i];
  }
  r[1] = check(x[1], y[1], x[2], y[2], x[3], y[3], dx[1], dy[1]);
  r[2] = check(x[2], y[2], x[1], y[1], x[3], y[3], dx[2], dy[2]);
  r[3] = check(x[3], y[3], x[1], y[1], x[2], y[2], dx[3], dy[3]);
  if (r[1] <= r[2] && r[1] <= r[3]) {
    out(1);
  } else if (r[2] <= r[1] && r[2] <= r[3]) {
    out(2);
  } else if (r[3] <= r[1] && r[3] <= r[2]) {
    out(3);
  }
  return 0;
}
