#include using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { vector> v(3); rep(i, 3) cin >> v[i].first >> v[i].second; vector p(3); iota(p.begin(), p.end(), 0); do { int dx = v[p[1]].first - v[p[0]].first; int dy = v[p[1]].second - v[p[0]].second; Debug(p, dx, dy); if (v[p[2]].first - v[p[1]].first == -dy && v[p[2]].second - v[p[1]].second == dx) { cout << v[p[2]].first - dx << ' ' << v[p[2]].second - dy << endl; return 0; } } while (next_permutation(p.begin(), p.end())); cout << -1 << endl; return 0; }