#include using namespace std; #define ll long long int bitcount(ll x) { int ret = 0; while(x>0) { if(x%2==1) ret++; x/=2; } return ret; } int main() { ll k; cin >> k; cout << "32 " << 30+435+bitcount(k) << endl; for(int i=2; i<=31; i++) { cout << "1 " << i << endl; } for(int i=2; i<=31; i++) { for(int j=i+1; j<=31; j++) { cout << i << " " << j << endl; } } int i=2; while(k>0) { if(k%2==1) { cout << i << " " << 32 << endl; } i++; k/=2; } return 0; }