#include using namespace std ; typedef long long ll ; const int maxn = 1e6 + 7 ; ll n ; vector < pair < ll , ll > > q ; int main(){ ios :: sync_with_stdio(0) ; cin.tie(0) ; cout.tie(0) ; cin >> n ; for(int i = 0 ; i < 62 ; i ++){ for(int j = i + 1 ; j < 62 ; j ++){ q.push_back({i , j}) ; } } for(int i = 0 ; i < 62 ; i ++){ ll x = (n >> i) & 1 ; if(x) q.push_back({i + 1 , 61}) ; } cout << 62 << " " << (int)q.size() << endl ; for(int i = 0 ; i < (int)q.size() ; i ++){ cout << q[i].first + 1 << " " << q[i].second + 1 << endl ; } cout << endl ; return 0 ; }