#include using namespace std; typedef pair P; bool check(P p[4]){ set > s; for(int i = 0; i < 4; i++){ vector v; for(int j = 0; j < 4; j++){ if(i == j) continue; int mx = p[i].first - p[j].first, my = p[i].second - p[j].second; int d = mx*mx+my*my; if(d == 0) return false; v.push_back(d); } sort(v.begin(), v.end()); if(v[0] != v[1] && v[1] != v[2]) return false; s.insert(v); } return (s.size() == 1); } int main(){ P p[4]; for(int i = 0; i < 3; i++){ int x,y; cin >> x >> y; p[i] = P(x,y); } for(int y = -200; y <= 200; y++){ for(int x = -200; x <= 200; x++){ p[3] = P(x,y); if(check(p)){ cout << x << " " << y << endl; return 0; } } } cout << -1 << endl; return 0; }