#include <bits/stdc++.h>
long long a[5], b[5];
long long gcd(long long a, long long b) { return (!b) ? a : gcd(b, a % b); }
long long Abs(long long x) { return (x < 0) ? -x : x; }
long long getgcd(long long *a) {
  long long ans = 0;
  for (long long i = 1; i <= 4; i++)
    for (long long j = 1; j <= 4; j++) ans = gcd(ans, Abs(a[i] - a[j]));
  return ans;
}
struct info {
  info() { ope.clear(), p.clear(); }
  std::vector<std::pair<long long, long long> > ope, p;
  void flip(long long x, long long y) {
    ope.push_back(std::make_pair(p[x].first, p[y].first));
    p[x].first = (p[y].first << 1) - p[x].first;
  }
  std::pair<long long, long long> &operator[](long long n) { return p[n]; }
};
std::vector<std::pair<long long, long long> > ans;
info compress(long long *a) {
  info ans;
  for (long long i = 1; i <= 4; i++) ans.p.push_back(std::make_pair(a[i], i));
  for (;;) {
    std::sort(ans.p.begin(), ans.p.end());
    if (ans[0].first == ans[3].first - 1) break;
    long long old = (ans[3].first - ans[0].first);
    long long l, r;
    l = ans[1].first,
    r = std::max(ans[3].first, (ans[1].first << 1) - ans[0].first);
    if (((r - l) << 2) <= (ans[3].first - ans[0].first) * 3) {
      ans.flip(0, 1);
      continue;
    }
    r = ans[2].first,
    l = std::min(ans[0].first, (ans[2].first << 1) - ans[3].first);
    if (((r - l) << 2) <= (ans[3].first - ans[0].first) * 3) {
      ans.flip(3, 2);
      continue;
    }
    {
      long long d1 = ans[3].first - ans[2].first,
                d0 = ans[1].first - ans[0].first,
                tot = ans[3].first - ans[0].first;
      if (d1 < (tot >> 2) && d0 < (tot >> 2)) {
        ans.flip(0, 3);
        ans.flip(1, 2);
        ans.flip(2, 3);
      } else if (d1 > d0) {
        ans.flip(2, 3);
        ans.flip(1, 2);
        ans.flip(1, 3);
        ans.flip(2, 3);
      } else {
        ans.flip(1, 0);
        ans.flip(2, 1);
        ans.flip(2, 0);
        ans.flip(1, 0);
      }
    }
  }
  if (ans[0].first & 1) {
    ans.flip(0, 3);
    ans.flip(1, 3);
    ans.flip(2, 3);
  }
  std::sort(ans.p.begin(), ans.p.end());
  return ans;
}
info move(std::vector<std::pair<long long, long long> > pos1,
          std::vector<std::pair<long long, long long> > pos2) {
  info ans;
  ans.p = pos1;
  long long delta = pos2[0].first - pos1[0].first, l = 0;
  std::vector<std::pair<long long, long long> > tem;
  for (;;) {
    std::sort(ans.p.begin(), ans.p.end());
    if (ans[3].first - ans[0].first > Abs(delta)) break;
    ++l;
    ans.flip(2, 0);
    ans.flip(1, 3);
  }
  for (;;) {
    std::sort(ans.p.begin(), ans.p.end());
    long long change = (ans[3].first - ans[0].first) << 1;
    for (;;) {
      if (delta >= change) {
        ans.flip(0, 3);
        ans.flip(1, 3);
        ans.flip(2, 3);
        ans.flip(3, 0);
        ans.flip(2, 0);
        ans.flip(1, 0);
        delta -= change;
      } else if (delta <= -change) {
        ans.flip(1, 0);
        ans.flip(2, 0);
        ans.flip(3, 0);
        ans.flip(2, 3);
        ans.flip(1, 3);
        ans.flip(0, 3);
        delta += change;
      } else
        break;
    }
    if (l) {
      --l;
      ans.flip(0, 1);
      ans.flip(3, 2);
    } else
      break;
  }
  return ans;
}
void add(std::vector<std::pair<long long, long long> > tem) {
  for (long long i = 0; i < tem.size(); i++)
    if (tem[i].first != tem[i].second) ans.push_back(tem[i]);
}
signed main() {
  for (long long i = 1; i <= 4; i++) scanf("%lld", a + i);
  for (long long i = 1; i <= 4; i++) scanf("%lld", b + i);
  long long _gcd = getgcd(a);
  if (!_gcd) {
    if (getgcd(b) == 0 && b[1] == a[1])
      puts("0");
    else
      puts("-1");
    return 0;
  }
  long long x = ((a[1] % _gcd) + _gcd) % _gcd;
  if (_gcd != getgcd(b) ||
      (b[1] % _gcd + _gcd) % _gcd != (a[1] % _gcd + _gcd) % _gcd) {
    puts("-1");
    return 0;
  }
  for (long long i = 1; i <= 4; i++) (a[i] -= x) /= _gcd, (b[i] -= x) /= _gcd;
  long long cnt = 0;
  for (long long i = 1; i <= 4; i++) cnt += (a[i] & 1) - (b[i] & 1);
  if (cnt) {
    puts("-1");
    return 0;
  }
  for (long long i = 1; i <= 4; i++)
    if ((a[i] + b[i]) & 1) {
      for (long long j = i + 1; j <= 4; j++)
        if ((b[j] & 1) == (a[i] & 1)) {
          std::swap(b[i], b[j]);
          break;
        }
    }
  auto nowa = compress(a), nowb = compress(b);
  add(nowa.ope);
  add(move(nowa.p, nowb.p).ope);
  std::reverse(nowb.ope.begin(), nowb.ope.end());
  for (long long i = 0; i < nowb.ope.size(); i++) {
    nowb.ope[i].first = (nowb.ope[i].second << 1) - nowb.ope[i].first;
  }
  add(nowb.ope);
  printf("%d\n", ans.size());
  for (long long i = 0; i < ans.size(); i++)
    printf("%lld %lld\n", ans[i].first * _gcd + x, ans[i].second * _gcd + x);
}
