#include <bits/stdc++.h>
using namespace std;
long long a[10], b[10], G1, G2;
vector<pair<long long, long long> > q1, q2;
long long gcd(long long x, long long y) { return y ? gcd(y, x % y) : x; }
void getopt(long long *a, vector<pair<long long, long long> > &vec) {
  for (;;) {
    sort(a + 1, a + 4 + 1);
    if (a[4] - a[1] == 1) break;
    long long P = -(1ll << 60);
    for (;;) {
      if (a[2] * 4 >= a[1] * 3 + a[4] && a[2] * 4 <= a[1] + a[4] * 3) P = a[2];
      if (a[3] * 4 >= a[1] * 3 + a[4] && a[3] * 4 <= a[1] + a[4] * 3) P = a[3];
      if (P != -(1ll << 60)) break;
      long long v1 = min(a[2] - a[1], a[4] - a[2]);
      long long v2 = min(a[3] - a[1], a[4] - a[3]);
      if (v1 > v2) swap(v1, v2), swap(a[2], a[3]);
      int id1 = 3, id2 = (a[4] - a[3] < a[3] - a[1] ? 4 : 1);
      if (id1 > id2) swap(id1, id2);
      if (a[4] - a[2] < a[2] - a[1]) swap(id1, id2);
      vec.push_back(pair<long long, long long>(a[2], a[id1]));
      a[2] = 2ll * a[id1] - a[2];
      vec.push_back(pair<long long, long long>(a[2], a[id2]));
      a[2] = 2ll * a[id2] - a[2];
    }
    if (2 * P <= a[1] + a[4]) {
      for (int i = (int)(1); i <= (int)(4); i++)
        if (a[i] < P) {
          vec.push_back(pair<long long, long long>(a[i], P));
          a[i] = 2ll * P - a[i];
        }
    } else {
      for (int i = (int)(1); i <= (int)(4); i++)
        if (a[i] > P) {
          vec.push_back(pair<long long, long long>(a[i], P));
          a[i] = 2ll * P - a[i];
        }
    }
  }
  sort(a + 1, a + 4 + 1);
  if (a[1] & 1)
    for (int i = (int)(1); i <= (int)(4); i++)
      if (a[i] & 1) {
        vec.push_back(pair<long long, long long>(a[i], a[i] + 1));
        a[i] += 2;
      }
  sort(a + 1, a + 4 + 1);
}
int main() {
  for (int i = (int)(1); i <= (int)(4); i++) scanf("%lld", &a[i]);
  for (int i = (int)(1); i <= (int)(4); i++) scanf("%lld", &b[i]);
  sort(a + 1, a + 4 + 1);
  sort(b + 1, b + 4 + 1);
  for (int i = (int)(2); i <= (int)(4); i++) G1 = gcd(G1, a[i] - a[1]);
  for (int i = (int)(2); i <= (int)(4); i++) G2 = gcd(G2, b[i] - b[1]);
  if (G1 != G2) return puts("-1"), 0;
  if (!G1) return puts(a[1] == b[1] ? "0" : "-1"), 0;
  if ((a[1] - b[1]) % G1) return puts("-1"), 0;
  long long G = G1, rem = (a[1] % G + G) % G;
  for (int i = (int)(1); i <= (int)(4); i++) a[i] = (a[i] - rem) / G;
  for (int i = (int)(1); i <= (int)(4); i++) b[i] = (b[i] - rem) / G;
  getopt(a, q1);
  getopt(b, q2);
  for (int i = (int)(1); i <= (int)(4); i++)
    if ((a[i] & 1) != (b[i] & 1)) return puts("-1"), 0;
  long long d = (b[1] - a[1]) / 2;
  for (; 3 * (a[4] - a[1]) <= abs(d);) {
    q1.push_back(pair<long long, long long>(a[3], a[1]));
    a[3] = 2 * a[1] - a[3];
    q1.push_back(pair<long long, long long>(a[2], a[4]));
    a[2] = 2 * a[4] - a[2];
    sort(a + 1, a + 4 + 1);
  }
  for (;;) {
    for (; abs(d) >= a[4] - a[1];)
      if (d < 0) {
        d += a[4] - a[1];
        for (int T = (int)(1); T <= (int)(2); T++) {
          for (int i = (int)(2); i <= (int)(4); i++) {
            q1.push_back(pair<long long, long long>(a[i], a[1]));
            a[i] = 2ll * a[1] - a[i];
          }
          sort(a + 1, a + 4 + 1);
        }
      } else {
        d -= a[4] - a[1];
        for (int T = (int)(1); T <= (int)(2); T++) {
          for (int i = (int)(1); i <= (int)(3); i++) {
            q1.push_back(pair<long long, long long>(a[i], a[4]));
            a[i] = 2ll * a[4] - a[i];
          }
          sort(a + 1, a + 4 + 1);
        }
      }
    if (a[4] - a[1] <= 1) break;
    q1.push_back(pair<long long, long long>(a[1], a[2]));
    a[1] = 2ll * a[2] - a[1];
    q1.push_back(pair<long long, long long>(a[4], a[3]));
    a[4] = 2ll * a[3] - a[4];
    sort(a + 1, a + 4 + 1);
  }
  for (int i = (int)(q2.size() - 1); i >= (int)(0); i--)
    q1.push_back(pair<long long, long long>(2 * q2[i].second - q2[i].first,
                                            q2[i].second));
  int top = 0;
  for (int i = (int)(0); i <= (int)(q1.size() - 1); i++) {
    q1[top].first = q1[i].first * G + rem;
    q1[top].second = q1[i].second * G + rem;
    if (q1[top].first != q1[top].second) ++top;
  }
  printf("%d\n", top);
  for (int i = (int)(0); i <= (int)(top - 1); i++)
    printf("%lld %lld\n", q1[i].first, q1[i].second);
}
