#include using namespace std; int main() { int K; cin >> K; vector< int > s(32); s[0] = 1; vector< pair< int, int > > es; for(int i = 1; i < 32; i++) { for(int j = i - 1; j >= 0; j--) { if(s[i] + s[j] <= K) { s[i] += s[j]; es.emplace_back(j, i); } } } cout << 32 << " " << es.size() << endl; for(auto &p : es) cout << p.first + 1 << " " << p.second + 1 << endl; }