#include #include #include #include #include using namespace std; int main() { vector x(3, 0); vector y(3, 0); for (int i = 0; i < 3; i++) { cin >> x[i] >> y[i]; } for (int i = 0; i < 3; i++) { int j = (i + 1) % 3; int k = (i + 2) % 3; if (abs(x[j] - x[i]) == abs(x[k] - x[i]) && abs(y[j] - y[i]) == abs(y[k] - y[i])) { break; } if (abs(x[j] - x[i]) == abs(y[k] - y[i]) && abs(y[j] - y[i]) == abs(x[k] - x[i])) { int nx = x[k] + x[j] - x[i]; int ny = y[k] + y[j] - y[i]; cout << nx << " " << ny << endl; return 0; } } cout << -1 << endl; return 0; }