#include #include #include #include #include #include #include #include #include #include #define mkp make_pair #define mkt make_tuple #define rep(i,n) for(int i = 0; i < (n); ++i) #define all(v) v.begin(),v.end() using namespace std; typedef long long ll; const ll MOD=1e9+7; template void chmin(T &a,const T &b){if(a>b) a=b;} template void chmax(T &a,const T &b){if(a>s; if(s=="out") return 0; else return 1; } const int L=1e3; int main(){ cin.tie(0); ios::sync_with_stdio(false); vector pri(L+20,1); for(int i=2;i<=L+10;i++){ if(pri[i]==0) continue; for(int j=2;i*j<=L+10;j++) pri[i*j]=0; } vector prime={0}; for(int i=1;i<=L+10;i++) if(pri[i]) prime.push_back(i); int P=prime.size(); int ok=0,ng=P-1; map mp; while(abs(ok-ng)>2){ int mid=(ok+ng)/2; if((mp.count(prime[mid])&&mp[prime[mid]])||ask(prime[mid])){ ok=mid; mp[prime[mid]]=1; }else{ mp[prime[mid]]=0; if((mp.count(prime[mid+1])&&mp[prime[mid]]==1)||ask(prime[mid+1])){ ok=mid; mp[prime[mid+1]]=1; }else{ ng=mid+1; mp[prime[mid+1]]=0; } } } vector table; for(int i=prime[ok];i1){ int mid=abs(ok+ng)/2; if(ask(table[mid])) ok=mid; else ng=mid; } cout<<"!"<<" "<