#include #include #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 response; cin >> response; if (response <= 1)return 0; } int k, x; cin >> k >> x; if (k == 1) cout << k << " " << n + 1 - x << endl; else cout << k << " " << n - x << endl; } return 0; }