#include using namespace std; #define REP(i,n) for(int i=0; i<(int)(n); i++) #define FOR(i,b,e) for (int i=(int)(b); i<(int)(e); i++) #define ALL(x) (x).begin(), (x).end() const double PI = acos(-1); double EPS = 1e-9; bool check(vector > ps) { vector dist; REP (i, 4) REP (j, i) { int x = ps[i].first - ps[j].first; int y = ps[i].second - ps[j].second; dist.push_back(x * x + y * y); } sort(dist.begin(), dist.end()); return dist[1] == dist[0] && dist[2] == dist[0] && dist[3] == dist[0] && dist[4] == 2 * dist[0] && dist[5] == 2 * dist[0]; } int main() { ios_base::sync_with_stdio(0); cin.tie(0); vector > ps; REP (i, 3) { int x, y; cin >> x >> y; ps.emplace_back(x, y); } for (int x = -500; x <= 500; x++) { for (int y = -500; y <= 500; y++) { ps.emplace_back(x, y); if (check(ps)) { cout << x << " " << y << endl; return 0; } ps.pop_back(); } } cout << -1 << endl; return 0; }