#include using namespace std; typedef pair P; bool check(P p[4]){ for(int i = 0; i < 4; i++){ set s; 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; s.insert(d); } if(s.size() != 2) return false; } return true; } 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 = -300; y <= 300; y++){ for(int x = -300; x <= 300; x++){ p[3] = P(x,y); if(check(p)){ cout << x << " " << y << endl; return 0; } } } cout << -1 << endl; return 0; }