#include"testlib.h"
#include<bits/stdc++.h>
#define all(v) v.begin(), v.end()
 
using namespace std;
 
int32_t main(int argc, char *argv[]) {
    registerGen(argc, argv, 1);

    cout << 1 << '\n';
    int n = 100000;
    int k = (n - 1) / 3;
    vector <pair <int, int> > e;
    for (int i = 2; i <= n; i += 3) {
    	int j = i + 1;
    	int k = i + 2;
    	e.push_back({1, i});
    	e.push_back({i, j});
    	e.push_back({j, k});
    	e.push_back({k, i});
    }
    cout << n << ' ' << e.size() << '\n';
    for (auto [u, v] : e) {
    	cout << u << ' ' << v << '\n';
    }
 
}
