#include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; long long MOD = 1000000007; int main() { vector< pair > P; for ( int i = 0; i < 3; i++ ) { int x,y; cin >> x >> y; P.push_back(make_pair( x,y )); } vector V = {0,1,2,3}; for ( int x = -200; x <= 200; x++ ) { for ( int y = -200; y <= 200; y++ ) { bool ng = false; for ( int i = 0; i < 3; i++ ) { if ( x == P[i].first && y == P[i].second ) { ng = true; } } if ( ng ) { continue; } P.push_back(make_pair(x,y) ); bool is_ok = true; do { int p = ( P[V[0]].first-P[V[1]].first ) * ( P[V[2]].first-P[V[3]].first ) + ( P[V[0]].second-P[V[1]].second ) * ( P[V[2]].second-P[V[3]].second ); int d1 = ( P[V[0]].first-P[V[1]].first ) * ( P[V[0]].first-P[V[1]].first ) + ( P[V[0]].second-P[V[1]].second ) * ( P[V[0]].second-P[V[1]].second ); int d2 = ( P[V[2]].first-P[V[3]].first ) * ( P[V[2]].first-P[V[3]].first ) + ( P[V[2]].second-P[V[3]].second ) * ( P[V[2]].second-P[V[3]].second ); if ( d1 != d2 ) { is_ok = false; } if ( p != 0 && p != d1 && -p != d1 ) { is_ok = false; } } while ( next_permutation(V.begin(),V.end()) ); if ( is_ok ) { cout << x << " " << y << endl; return 0; } P.pop_back(); } } cout << -1 << endl; return 0; }