#define rep(i,n) for(int i=0;i<(int)(n);i++) #define ALL(v) v.begin(),v.end() typedef long long ll; #include using namespace std; ll f(ll a,ll b){ return 2*b-a; } int main(){ ios::sync_with_stdio(false); std::cin.tie(nullptr); int n; cin>>n; int cl,cr; cout<<"? "<<1<>cl; cl=f(1,cl); cout<<"? "<>cr; cr=f(n-1,cr); if(cl==cr) cout<<"! "<<2<<" "<cr){ int ok=n-1,ng=1; while(ok-ng>1){ int mid=(ok+ng)/2; cout<<"? "<>t; if(f(mid,t)<0) ok=mid; else ng=mid; } int s=ok-1; if(s>=n/2) cout<<"! "<<1<<" "<1){ int mid=(ok+ng)/2; cout<<"? "<>t; if(f(mid,t)>0) ok=mid; else ng=mid; } int s=ok-1; if(s>=n/2) cout<<"! "<<1<<" "<