#include #include #include int main(){ std::ios::sync_with_stdio(false); std::cin.tie(0); std::vector x(3); std::vector y(3); for(int i=0; i<3; ++i){ std::cin >> x[i] >> y[i]; } for(int i=0; i<3; ++i){ for(int j=0; j<2; ++j){ bool argCondition = (std::fabs(std::fmod(std::atan2(y[(i+1+j)%3]-y[i], x[(i+1+j)%3]-x[i])-std::atan2(y[(i+2-j)%3]-y[i], x[(i+2-j)%3]-x[i]), M_PI) - M_PI/2)<0.00001); bool distCondition = (std::fabs((std::pow(x[(i+1+j)%3]-x[i], 2)+std::pow(y[(i+1+j)%3]-y[i], 2)) - (std::pow(x[(i+2-j)%3]-x[i], 2)+std::pow(y[(i+2-j)%3]-y[i], 2)))<0.00001); if(argCondition && distCondition){ std::cout << x[(i+1+j)%3] + (x[(i+2-j)%3] - x[i]) << " " << y[(i+1+j)%3] + (y[(i+2-j)%3] - y[i]) << "\n"; return 0; } } } std::cout << -1 << "\n"; return 0; }