#include using namespace std; #define _p(...) (void)printf(__VA_ARGS__) #define forr(x,arr) for(auto&& x:arr) #define _overload3(_1,_2,_3,name,...) name #define _rep2(i,n) _rep3(i,0,n) #define _rep3(i,a,b) for(int i=int(a);i=int(a);i--) #define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__) #define all(x) (x).begin(), (x).end() #define bit(n) (1LL<<(n)) #define sz(x) ((int)(x).size()) #define fst first #define snd second using ll=long long;using pii=pair; using vb=vector;using vs=vector; using vi=vector;using vvi=vector;using vvvi=vector; using vl=vector;using vvl=vector;using vvvl=vector; using vd=vector;using vvd=vector;using vvvd=vector; using vpii=vector;using vvpii=vector;using vvvpii=vector; templateostream&operator<<(ostream&o,const pair&p){o<<'('< Vec; typedef vector Mat; Vec gauss_jordan(const Mat& A, const Vec& b) { assert(A.size() == A[0].size()); const int n = A.size(); Mat B(n, Vec(n + 1)); for (int i = 0; i < n; i++) for (int j = 0; j < n; j++) B[i][j] = A[i][j]; for (int i = 0; i < n; i++) B[i][n] = b[i]; for (int i = 0; i < n; i++) { int pivot = i; for (int j = i; j < n; j++) if (abs(B[j][i]) > abs(B[pivot][i])) pivot = j; swap(B[i], B[pivot]); if (abs(B[i][i]) <= EPS) return Vec(); for (int j = i + 1; j <= n; j++) B[i][j] /= B[i][i]; for (int j = 0; j < n; j++) { if (i != j) { for (int k = i + 1; k <= n; k++) B[j][k] -= B[j][i] * B[i][k]; } } } Vec x(n); for (int i = 0; i < n; i++) x[i] = B[i][n]; return x; } using point = complex; int m; vector P; point query(const point& p) { _p("? %lld %lld\n", p.real(), p.imag()); fflush(stdout); ll x, y; scanf("%lld%lld", &x, &y); return {x, y}; } void Main() { scanf("%d", &m); rep(i, m) { int x, y; scanf("%d%d", &x, &y); P.emplace_back(x, y); } int q = min(m, 10); vector Q(q); rep(i, q) { Q[i] = query(P[i]); } /* */ if (m <= 10) { _p("!\n"); fflush(stdout); forr(p, Q) { _p("%lld %lld\n", p.real(), p.imag()); fflush(stdout); } return; } rep(i, m) rep(j, i+1, m) rep(k, j+1, m) { Mat a = { {P[i].real(), P[i].imag(), 1}, {P[j].real(), P[j].imag(), 1}, {P[k].real(), P[k].imag(), 1}, }; Vec b1 = {Q[i].real(), Q[j].real(), Q[k].real()}; Vec b2 = {Q[i].imag(), Q[j].imag(), Q[k].imag()}; Vec b3 = {1, 1, 1}; Vec x1 = gauss_jordan(a, b1); Vec x2 = gauss_jordan(a, b2); Vec x3 = gauss_jordan(a, b3); if (sz(x1) && sz(x2) && sz(x3)) { vector ans; bool ok = 1; forr(p, P) { ll nx = x1[0] * p.real() + x1[1] * p.imag() + x1[2]; ll ny = x2[0] * p.real() + x2[1] * p.imag() + x2[2]; ll nz = x3[0] * p.real() + x3[1] * p.imag() + x3[2]; if (nz != 1) { ok = false; continue; } ans.emplace_back(nx, ny); } if (ok) { _p("!\n"); fflush(stdout); forr(p, ans) { _p("%lld %lld\n", p.real(), p.imag()); fflush(stdout); } return; } } } } int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }