#include #define show(x) std::cerr << #x << " = " << x << std::endl using ll = long long; int main() { int K; std::cin >> K; if (K == 0) { return std::cout << "2 0" << std::endl, 0; } std::cout << 32 << " " << 465 + __builtin_popcount(K) << std::endl; for (int i = 1; i <= 31; i++) { for (int j = i + 1; j <= 31; j++) { std::cout << i << " " << j << std::endl; } } for (int i = 0; i <= 29; i++) { if (K & (1 << i)) { std::cout << i + 2 << " " << 32 << std::endl; } } return 0; }