#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 a2 = ( x[ i ] - x[ 3 - i - j ] ) * ( x[ i ] - x[ 3 - i - j ] ) + ( y[ i ] - y[ 3 - i - j ] ) * ( y[ i ] - y[ 3 - i - j ] ); if( a2 != ( x[ j ] - x[ 3 - i - j ] ) * ( x[ j ] - x[ 3 - i - j ] ) + ( y[ j ] - y[ 3 - i - j ] ) * ( y[ j ] - y[ 3 - i - j ] ) ) 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; }