#include #include #include #include #include #include #include #include #include #include using namespace std; #define int long long int MOD = 1000000007; signed main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int a = 0; int n = N; vector < pair > res; a = 2; int k = 31 * 15; while (n > 0) { if (n % 2 == 1) { k++; res.emplace_back(a, 32); } n /= 2; a++; } cout << 32 << " " << k << endl; int z = 0; for (int i = 1; i <= 31; i++) { for (int j = i + 1; j <= 31; j++) { cout << i << " " << j << endl; z++; } } for (int i = 0; i < res.size(); i++) { cout << res[i].first << " " << res[i].second << endl; z++; } //cout << z << endl; }