#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,a,n) for(int i=(a); i<(int)(n); i++) #define rep(i,n) REP(i,0,n) #define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it) #define ALLOF(c) (c).begin(), (c).end() typedef long long ll; double dist(pair x, pair y){ int dx = x.first - y.first; int dy = x.second - y.second; return sqrt(dx*dx + dy*dy); } int main(){ vector< pair > v; rep(i,3){ int x, y; cin >> x >> y; v.push_back(make_pair(x,y)); } rep(i,3){ rep(j,3){ rep(k,3){ if(i==j || j==k || i==k) continue; double dist1 = dist(v[i], v[j]); double dist2 = dist(v[i], v[k]); double dist3 = dist(v[j], v[k]); if(fabs(dist1-dist2)<1e-6 && fabs(sqrt(2)*dist1-dist3)<1e-6){ int nx = v[j].first - v[i].first + v[k].first; int ny = v[j].second - v[i].second + v[k].second; cout << nx << " " << ny << endl; return 0; } } } } cout << -1 << endl; return 0; }