#include using namespace std; #define lp(i, a, b) for (int i = (int)(a); i < (int)(b); i++) #define rep(i, n) lp(i, 0, n) #define rlp(i, a, b) for (int i = (int)(b) - 1; i >= (int)(a); i--) #define rrep(i, n) rlp(i, 0, n) #define mp make_pair #define mt make_tuple #define pb push_back #define eb emplace_back #define all(c) begin(c), end(c) typedef long long ll; typedef unsigned long long ull; template inline bool chmin(T &a, T b){ if (a <= b) return false; a = b; return true; } template inline bool chmax(T &a, T b){ if (a >= b) return false; a = b; return true; } template inline void unique(T &c){ sort(all(c)); c.erase(unique(all(c)), end(c)); } template inline T sq(T a){ return a * a; } int main() { int x[4], y[4]; rep(i, 3) cin >> x[i] >> y[i]; lp(a, -200, 200) lp(b, -200, 200){ x[3] = a; y[3] = b; set st; rep(i, 4) lp(j, 0, i){ st.insert(sq(x[i] - x[j]) + sq(y[i] - y[j])); } if (st.size() == 2){ cout << x[3] << " " << y[3] << endl; return 0; } } cout << -1 << endl; }