#include using namespace std; int main() { int N; cin >> N; auto dfs = [&](auto& self, int l, int r) -> void { if (r - l == 1) { return; } int m = (l + r) / 2; self(self, l, m); self(self, m, r); cout << l + 1 << ' ' << m + 1 << endl; }; cout << 31 << endl; dfs(dfs, 0, 32); return 0; }