#include using namespace std; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); int N; cin >> N; int answer = 0; auto check = [&](auto check,vector now,int M,int all) -> void { cout << M << " " << 1 << endl; cout << now.at(0) << endl; int c; cin >> c; if(c){ if(M > N) answer += now.at(0)*c; else check(check,{now.at(0),now.at(0)+M},M+M,c); } int c2 = all-c; if(c2){ if(M > N) answer += now.at(1)*c2; else check(check,{now.at(1),now.at(1)+M},M+M,c2); } }; check(check,{0,1},2,5); cout << "0 1" << endl; cout << answer << endl; }