#include #include using namespace std; struct P { __int128 x,y; }; P operator-(const P&l, const P&r){ return {l.x-r.x, l.y-r.y}; } __int128 det(P a, P b){ return a.x*b.y - a.y*b.x; } __int128 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> x >> y; pts[i].x = x; pts[i].y = y; } long long low = -2000000000000000000; long long high = 2000000000000000000; P b1 = {-1000000000000000000,-1000000000000000000}; while (high - low > 1) { long long mid = (high+low)/2; P b2; if (mid < 0) { b2 = {1000000000000000000+mid,1000000000000000000}; } else if (mid > 0) { b2 = {1000000000000000000,1000000000000000000-mid}; } else { b2 = {1000000000000000000,1000000000000000000}; } int left = 0; int right = 0; for (int i=0; i 0) right++; } if (left == right) { cout << (long long) b1.x << " " << (long long) b1.y << endl; cout << (long long) b2.x << " " << (long long) b2.y << endl; return 0; } if (left < right) low = mid; else high = mid; } return 0; }