#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair i_i; typedef pair ll_i; typedef pair d_i; typedef pair ll_ll; typedef pair d_d; struct edge { int u, v; double w; }; ll MOD = 1000000007; ll _MOD = 1000000009; ll MOD2 = 1LL << 32; int dx[4] = {-1, 0, 1, 0}; int dy[4] = {0, -1, 0, 1}; void rotate(vector& a) { ll tmp = a[0]; a[0] = a[1]; a[1] = a[2]; a[2] = tmp; } int main() { vector X(3), Y(3); for (int i = 0; i < 3; i++) cin >> X[i] >> Y[i]; for (int k = 0; k < 3; k++) { rotate(X); rotate(Y); ll x1 = X[1] - X[0], y1 = Y[1] - Y[0]; ll x2 = X[2] - X[0], y2 = Y[2] - Y[0]; if (x1 * x1 + y1 * y1 != x2 * x2 + y2 * y2) continue; if (x1 * x2 + y1 * y2 != 0) continue; cout << X[0] + x1 + x2 << ' ' << Y[0] + y1 + y2 << endl; return 0; } cout << -1 << endl; }