#include #include using namespace std; int main() { int x1, y1, x2, y2, x3, y3; cin >> x1 >> y1 >> x2 >> y2 >> x3 >> y3; map x_counter, y_counter; x_counter[x1]++; y_counter[y1]++; x_counter[x2]++; y_counter[y2]++; x_counter[x3]++; y_counter[y3]++; if (x_counter.size() == 2 && y_counter.size() == 2) { int x, y; for (auto& it : x_counter) { if (it.second == 1) x = it.first; } for (auto& it : y_counter) { if (it.second == 1) y = it.first; } cout << x << " " << y << endl; } else { cout << -1 << endl; } return 0; }