#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int total = 2 * N; vector> pts(total); for (int i = 0; i < total; i++){ int x, y; cin >> x >> y; pts[i] = {x, y}; } { vector> pts_x = pts; sort(pts_x.begin(), pts_x.end(), [](const pair &a, const pair &b){ if(a.first != b.first) return a.first < b.first; return a.second < b.second; }); int X1 = pts_x[N-1].first, X2 = pts_x[N].first; if(X1 != X2){ int A = 2, B = 0; long long C = - ( (long long)X1 + X2 ); cout << A << " " << B << " " << C; return 0; } } { vector> pts_y = pts; sort(pts_y.begin(), pts_y.end(), [](const pair &a, const pair &b){ if(a.second != b.second) return a.second < b.second; return a.first < b.first; }); int Y1 = pts_y[N-1].second, Y2 = pts_y[N].second; if(Y1 != Y2){ int A = 0, B = 2; long long C = - ( (long long)Y1 + Y2 ); cout << A << " " << B << " " << C; return 0; } } vector> cand; for (int a = -8; a <= 8; a++){ for (int b = -8; b <= 8; b++){ if(a == 0 && b == 0) continue; cand.push_back({a, b}); } } for(auto &cb : cand){ int a = cb.first, b = cb.second; int maxScale = 100000; if(a != 0) maxScale = min(maxScale, 100000 / abs(a)); if(b != 0) maxScale = min(maxScale, 100000 / abs(b)); for (int k = maxScale; k <= maxScale; k++){ int A = a * k, B = b * k; vector vals(total); for (int i = 0; i < total; i++){ vals[i] = (long long)A * pts[i].first + (long long)B * pts[i].second; } sort(vals.begin(), vals.end()); if(vals[N] - vals[N - 1] >= 2){ long long C = -(vals[N - 1] + 1); cout << A << " " << B << " " << C; return 0; } } } return 0; }