#include using namespace std; using ll = long long; #define FOR(i,a,b) for(ll i=(a);i<(b);++i) #define ALL(v) (v).begin(), (v).end() #define p(s) cout<<(s)<; vector P; bool is_root(int index){ vector A; FOR(i, 0, 3){ if(i!=index){ auto v = P[i] - P[index]; A.push_back(v); } } if(A[0].real() * A[1].real() + A[0].imag() * A[1].imag() == 0){ return true; }else{ return false; } } int main(){ cin.tie(0); ios::sync_with_stdio(false); // input FOR(i, 0, 3){ double x, y; cin >> x >> y; auto p = Vec(x, y); P.push_back(p); } Vec ans; if(is_root(0)){ auto v = P[2] - P[0]; auto w = P[1] - P[0]; if(abs(v)!=abs(w)){p(-1); return 0;} ans = P[0] + v + w; } else if(is_root(1)){ auto v = P[2] - P[1]; auto w = P[0] - P[1]; if(abs(v)!=abs(w)){p(-1); return 0;} ans = P[1] + v + w; } else{ auto v = P[0] - P[2]; auto w = P[1] - P[2]; if(abs(v)!=abs(w)){p(-1); return 0;} ans = P[2] + v + w; } p2(ans.real(), ans.imag()); return 0; }