#include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
#include<random>
using namespace std;
typedef unsigned long long ull;
random_device seed;
mt19937 rnd(seed());
int range(int l,int r){return rnd()%(r-l+1)+l;}
ull ullrand(){return ((ull)rnd()<<32)|rnd();}
int main()
{
	freopen("dfs.in","w",stdout);
	int n=1000,T=4;
	printf("%d\n",T);
	while(T --> 0)
	{
		printf("%d %d\n",n,1);
		for(int i=1;i<=n;i++) printf("%d ",range(1,100000000));puts("");
		for(int i=2;i<=n;i++) printf("%d %d\n",1,i);
	}
	return 0;
}
