#include <bits/stdc++.h>
using namespace std;
int main() {
  int r1, r2, c1, c2, d1, d2;
  float x, y, p, q;
  cin >> r1 >> r2;
  cin >> c1 >> c2;
  cin >> d1 >> d2;
  y = ((r1 + d2) - c1) / 2;
  x = ((r1 + d1) - c2) / 2;
  p = ((c1 + d2) - r1) / 2;
  q = ((c2 + d1) - r1) / 2;
  if (p == q || x == y || x == p || y == q || x == q || y == p) {
    cout << "-1" << endl;
    if (x != (float)(int)x || y != (float)(int)y || p != (float)(int)p ||
        q != (float)(int)q)
      cout << "-1" << endl;
  } else {
    cout << x << " " << y << endl;
    cout << p << " " << q << endl;
  }
  return 0;
}
