#include using namespace std; signed main(){ vector< int > x( 3 ), y( 3 ); for( int i = 0; i < 3; ++i ) cin >> x[ i ] >> y[ i ]; for( int i = 0; i < 3; ++i ) for( int j = i + 1; j < 3; ++j ){ int h = abs( x[ i ] - x[ j ] ); int w = abs( y[ i ] - y[ j ] ); if( h != w ) continue; if( not ( abs( x[ 3 - i - j ] - x[ i ] ) == h and abs( y[ 3 - i - j ] - y[ j ] ) == w ) and not ( abs( x[ 3 - i - j ] - x[ j ] ) == h and abs( y[ 3 - i - j ] - y[ i ] ) == w ) ) continue; int g2x = x[ i ] + x[ j ]; int g2y = y[ i ] + y[ j ]; cout << g2x - x[ 3 - i - j ] << " " << g2y - y[ 3 - i - j ] << endl, exit( 0 ); } cout << -1 << endl; return 0; }