#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) -> 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); } cout << M << " " << 1 << endl; cout << now.at(1) << endl; cin >> c; if(c){ if(M > N) answer += now.at(1)*c; else check(check,{now.at(1),now.at(1)+M},M+M); } }; check(check,{0,1},2); cout << "0 1" << endl; cout << answer << endl; }