#include #include #include #include #include #include #include using namespace std; typedef long long ll; int main(){ ios::sync_with_stdio(false); cin.tie(0); cout << setprecision(10) << fixed; int N; int t, k, x; cin >> N; if(N == 1){ cout << 1 << ' ' << 1 << endl; cin >> t; return 0; } if(N == 2){ cout << 2 << ' ' << 1 << endl; cin >> t; return 0; } if(N%2 == 1){ int m = N/2+1; cout << 1 << ' ' << m << endl; while(true){ cin >> t; if(t <= 1) return 0; if(t == 2) { cin >> k >> x; return 0; } cin >> k >> x; if(x < m){ cout << k << ' ' << x+m << endl; }else{ cout << k << ' ' << x-m << endl; } } } if(N%2 == 0){ int m = N/2; cout << 2 << ' ' << m << endl; while(true){ cin >> t; if(t <= 1) return 0; if(t == 2) { cin >> k >> x; return 0; } cin >> k >> x; if(x < m){ cout << k << ' ' << x+m << endl; }else{ cout << k << ' ' << x-m << endl; } } } }