#include #include using namespace std; int main() { int x[4], y[4]; for(int i=0; i<3; ++i){ cin >> x[i] >> y[i]; } for(int i=0; i<3; ++i){ if(hypot(x[i]-x[(i+1)%3], y[i]-y[(i+1)%3]) == hypot(x[i]-x[(i+2)%3], y[i]-y[(i+2)%3])){ if(!((x[(i+1)%3] - x[i]) * (x[(i+2)%3] - x[i]) + (y[(i+1)%3] - y[i]) * (y[(i+2)%3] - y[i]))){ x[3] = x[(i+1)%3] + x[(i+2)%3] - x[i]; y[3] = y[(i+1)%3] + y[(i+2)%3] - y[i]; cout << x[3] << " " << y[3] << endl; return 0; } } } cout << -1 << endl; return 0; }