#include #include using namespace std; struct P { long long x, y; }; P operator-(const P &l, const P &r) { return {l.x-r.x, l.y-r.y}; } long long det(P a, P b) { return a.x * b.y - a.y * b.x; } long long det(P a, P b, P c) { return det(b-a, c-a); } int main() { int N; cin >> N; vector

pts(N); for (int i=0; i> pts[i].y >> pts[i].x; long long low = -1000000001; long long high = 1000000001; while (high - low > 1) { long long mid = (high+low)/2; P b1 = {mid,0}; P b2 = {mid,1}; int left = 0; int right = 0; for (int i=0; i 0) right++; } if (left == right) { cout << b1.y-(b2.x-b1.x) << " " << b1.x+(b2.y-b1.y) << endl; cout << b1.y+(b2.x-b1.x) << " " << b1.x-(b2.y-b1.y) << endl; return 0; } if (left < right) low = mid; else high = mid; } low = -1000000002; high = 1000000002; while (high-low > 1) { long long mid = (high+low)/2; P b1 = {mid, -1000000001}; P b2 = {mid+1, 1000000001}; int left = 0; int right = 0; for (int i=0; i 0) right++; } if (left == right) { cout << b1.y-(b2.x-b1.x) << " " << b1.x+(b2.y-b1.y) << endl; cout << b1.y+(b2.x-b1.x) << " " << b1.x-(b2.y-b1.y) << endl; return 0; } if (left < right) low = mid; else high = mid; } cout << -1000000001 << " " << low << endl; cout << 1000000001 << " " << high << endl; }