#include #define rep(i, n) for(long long i = 0; i < n; i++) #define ALL(v) (v).begin(), (v).end() #define rALL(v) (v).rbegin(), (v).rend() using namespace std; using lint = long long; int main() { vector> xy(3); rep(i, 3) { cin >> xy[i].first >> xy[i].second; } auto dist = [](int x1, int y1, int x2, int y2) { return (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2); }; vector id = {0, 1, 2}; do { auto [x1, y1] = xy[id[0]]; auto [x2, y2] = xy[id[1]]; auto [x3, y3] = xy[id[2]]; if (dist(x1, y1, x2, y2) == dist(x2, y2, x3, y3)) { int dx = x1 - x2; int dy = y1 - y2; cout << x3 + dx << " " << y3 + dy << endl; return 0; } } while (next_permutation(ALL(id))); cout << -1 << endl; }