#include using namespace std; #define rep(i,n) for(int (i) = 0 ; (i) < (int)(n) ; (i)++) #define REP(i,a,b) for(int (i) = a ; (int)(i) <= (int)(b) ; (i)++) #define all(n) (n).begin(),(n).end() typedef long long ll; typedef vector Vi; typedef vector VVi; typedef pair Pii; typedef vector VPii; typedef complex P; P in(){ int x,y; cin >> x >> y; return P(x,y); } int main(){ vector

p; rep(i,3)p.push_back(in()); rep(i,3)rep(j,3) if( i != j ){ set s = {0,1,2}; s.erase(i); s.erase(j); int k = *s.begin(); P v = p[j] - p[i]; P a = p[i]; P b = p[j]; P c = p[j] + P(v.imag(),-v.real()); P d = p[i] + P(v.imag(),-v.real()); // cout << a << " " << b << " " << c << " " << d << endl; if( c == p[k] && norm(a-b) == norm(b-c) && norm(a-b) == norm(c-d) && norm(a-b) == norm(d-a) ){ //cout << norm(a-b) << " " << norm(b-c) << " " << norm(c-d) << endl; cout << d.real() << " " << d.imag() << endl; return 0; }else if( d == p[k] && norm(a-b) == norm(b-c) && norm(a-b) == norm(c-d) && norm(a-b) == norm(d-a) ){ cout << c.real() << " " << c.imag() << endl; return 0; } } cout << -1 << endl; }