#include #define rep(i,n) for(int i = 0; i < (n); i++) using namespace std; typedef long long ll; int main(){ cin.tie(0); ios::sync_with_stdio(0); vector> P(3); for(auto &[x, y] : P) cin >> x >> y; for(int x = -200; x <= 200; x++) { for(int y = -200; y <= +200; y++) { P.push_back({x, y}); if([x, y](vector> P) { sort(P.begin(), P.end()); int ok = 1; auto g = [](pair a, pair b) { auto [ax, ay] = a; auto [bx, by] = b; return (ax - bx) * (ax - bx) + (ay - by) * (ay - by); }; multiset st; rep(i,4)rep(j,i) st.insert(g(P[i], P[j])); ok &= st.count(*st.begin()) == 4 && st.count(*st.rbegin()) == 2; return ok; }(P)) { cout << x << " " << y << endl; return 0; } P.pop_back(); } } cout << -1 << endl; }