/* _/ _/ _/_/_/_/_/_/ _/ _/ _/_/ _/ _/ _/ _/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/ _/_/_/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/_/_/_/ _/ _/ _/ _/ */ #include #include #define re register #define endl '\n' #define ll long long #define ull unsigned long long #define db double #define fi const int& #define fl const ll& #define ful const ull& #define fc const char& #define fs const string& #define debug() puts("Running Successfully") using namespace std ; namespace IO { templateinline void read(T &x){char c=getchar(),f=false;x=0;while(c<48||c>57) {f|=(c==45),c=getchar();}while(c>=48&&c<=57){x=(x<<3)+(x<<1)+(c^48),c=getchar();}if(f){x=~x+1;}} templateinline void read(T &x,Arg &...arg){read(x),read(arg...);} templateinline void write(T x){if(x<0){putchar(45),x=~x+1;}if(x>9){write(x/10);}putchar(x%10|48);} templateinline void write(T x,fc c){write(x),putchar(c);} }using namespace IO ; int x ; struct edge { int u,v ; }e[4002] ; int tot ; inline void solve () { int tmp = x,bit = 0,ans = 0,len = 0 ; bool d[65] ; while (tmp) { d[len++] = tmp & 1 ; if (tmp & 1) ans = bit ; tmp >>= 1,++bit ; } for (re int i = 0 ; i < len ; ++i) { if (d[i]) e[++tot] = {i + 2,62} ; } ans += 2 ; write(62,' ') ; write(ans * (ans - 1) / 2 + tot,endl) ; for (re int i = 1 ; i < ans ; ++i) { for (re int j = i + 1 ; j <= ans ; ++j) { write(i,' ') ; write(j,endl) ; } } for (re int i = 1 ; i <= tot ; ++i) { write(e[i].u,' ') ; write(e[i].v,endl) ; } } int main () { read(x) ; solve() ; return 0 ; }