#include<bits/stdc++.h>
using namespace std;
#define ll long long
inline int read()
{
	char ch=getchar(); int ne=0; while(!isdigit(ch)) {if(ch=='-') ne=1; ch=getchar();}
	int ans=0; while(isdigit(ch)) ans=ans*10+ch-'0',ch=getchar();
	if(ne) return -ans;
	else return ans;
}
#define mod 998244353
inline int add(int x,int y) {return x+y>=mod?x+y-mod:x+y;}
inline int sub(int x,int y) {return x-y<0?x-y+mod:x-y;}
inline int mul(int x,int y) {return 1LL*x*y%mod;}
inline int add(int x,int y,int z) {return add(add(x,y),z);}
inline int mul(int x,int y,int z) {return mul(mul(x,y),z);}
int qpow(int x,ll y)
{
	int ans=1;
	while(y)
	{
		if(y&1) ans=mul(ans,x);
		x=mul(x,x),y>>=1;
	}
	return ans;
}
int Inv(int x) {return qpow(x,mod-2);}
mt19937_64 rnd((long long)new char);
int Rnd(int l,int r) {return rnd()%(r-l+1)+l;}
void work()
{
	int n=4000,rt=1;
	printf("%d %d\n",n,rt);
	for(int i=1;i<=n;i++) printf("%d%c",Rnd(1,1e9)," \n"[i==n]);
	for(int i=2;i<=n;i++) printf("%d %d\n",i,Rnd(1,1));
}
signed main()
{
	int T=5; cout<<T<<endl;
	while(T--) work();
	return 0;
}

