#include using namespace std; int main() { int n; cin >> n; // 最初の一手目 if(n % 2 == 0) cout << "2 " << n/2 << endl; else cout << "1 " << n/2+1 << endl; while(true) { // 入力:ゲームの状態 int t; cin >> t; if(t == 0 || t == 1) return 0; // 入力:相手が塗るマス情報 int k, x; cin >> k >> x; if(t == 2) return 0; // 相手が塗ったマスとは対称的に塗る cout << k << " " << n+2-x-k << endl; } }