#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, -400, 400) lp(b, -400, 400){ x[3] = a; y[3] = b; vector v; rep(i, 4) lp(j, 0, i){ v.eb(sq(x[i] - x[j]) + sq(y[i] - y[j])); } sort(all(v)); if (v[0] == v[1] && v[1] == v[2] && v[2] == v[3] && v[4] == v[5]){ cout << x[3] << " " << y[3] << endl; return 0; } } cout << -1 << endl; }