#include<bits/stdc++.h>
using namespace std;
mt19937 rd(time(0)+size_t(new(char)));
int a[1000005];
int main(){
	puts("1");
	int n=400000;
	printf("%d %d\n",n,1);
	for (int i=1;i<=n;i++)a[i]=i;
	shuffle(a+1,a+n+1,rd);
	for (int i=1;i<=n;i++)printf("%d ",a[i]);
	puts("");
	for (int i=2;i<=n;i++)printf("%d %d\n",i,i/2);
}
