#include <bits/stdc++.h>
using namespace std;
int main() {
  int r1, r2, c1, c2, d1, d2;
  cin >> r1 >> r2 >> c1 >> c2 >> d1 >> d2;
  int a = (d1 - r2 + c1) / 2;
  int b = (2 * r1 - d1 + r2 - c1) / 2;
  int d = (d1 + r2 - c1) / 2;
  int c = (c1 - d1 + r2) / 2;
  cout << a << " " << b << endl;
  cout << c << " " << d << endl;
  return 0;
}
