#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "assert.h" using namespace std; pair operator * (const int& r, const pair& p){ pair ret = (r&1)?pair{-p.second, p.first}:p; if(r&2) ret = {-ret.first, -ret.second}; return ret; } pair operator + (const pair& y, const pair& x){ pair ret = y; ret.first += x.first; ret.second += x.second; return ret; } pair operator - (const pair& y, const pair& x){ pair ret = y; ret.first -= x.first; ret.second -= x.second; return ret; } struct val{ int rot; pair con; val() : rot(0), con({0,0}){ } val(const int r_, const pair& o ) : rot(r_){ con = o - rot * o; } val(const val& x) : rot(x.rot), con(x.con){ } val operator = (const val& x){ rot = x.rot; con = x.con; } val operator * (const val& x){ val ret; ret.rot = (rot + x.rot) & 0b11; ret.con = x.rot * con + x.con; return ret; } pair operator () (const pair& v){ pair ret = rot * v + con; return ret; } }; ostream& operator << (ostream& os, const pair& x){ os << x.first << " " << x.second; return os; } int main(int argc, char* argv[]){ int m; cin >> m; vector> p(m); for(int i=0; i> p[i].first >> p[i].second; } pair a,b; a = {0,0}; b = {1,0}; pair a_,b_; cout << "? " << a << endl; cin >> a_.first >> a_.second; cout << "? " << b << endl; cin >> b_.first >> b_.second; val f; pair v = b_ - a_; map, int> r; r[{ 1, 0}] = 0; r[{ 0, 1}] = 1; r[{-1, 0}] = 2; r[{ 0,-1}] = 3; f.rot = r[v]; f.con = a_ - f(a); cout << "!" << endl; for(int i=0; i