#define _USE_MATH_DEFINES #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int d[3]; iota(d, d + 3, 0); int x[3], y[3]; for(int i = 0; i < 3; i++) { cin >> x[i] >> y[i]; } do { int dx = x[d[1]] - x[d[0]]; int dy = y[d[1]] - y[d[0]]; if(y[d[2]] + dx == y[d[1]] && x[d[2]] - dy == x[d[1]]) { cout << x[d[2]] - dx << " " << y[d[2]] - dy << endl; return 0; } } while(next_permutation(d, d + 3)); cout << -1 << endl; return 0; }