#include using namespace std; int main() { vector> pt(3); for (int i=0; i<3; i++) { cin >> pt[i].first >> pt[i].second; } for (int i=0; i<3; i++) { vector> vec; for (int j=0; j<3; j++) { if (i == j) continue; vec.push_back( pair( pt[j].first - pt[i].first, pt[j].second - pt[i].second ) ); } if (vec[0].first * vec[1].first + vec[0].second * vec[1].second != 0) { continue; } if ( vec[0].first * vec[0].first + vec[0].second * vec[0].second != vec[1].first * vec[1].first + vec[1].second * vec[1].second ) { continue; } int x = pt[i].first + vec[0].first + vec[1].first; int y = pt[i].second + vec[0].second + vec[1].second; cout << x << ' ' << y << '\n'; return 0; } cout << -1 << '\n'; return 0; }