#include<bits/stdc++.h>
template<typename _Tp>void read(_Tp &x){
	char ch(getchar());bool f=0;while(!isdigit(ch))f|=ch=='-',ch=getchar();
	x=ch&15,ch=getchar();while(isdigit(ch))x=x*10+(ch&15),ch=getchar();
	if(f)x=-x;
}
std::mt19937 rnd(std::chrono::steady_clock::now().time_since_epoch().count());
int main(){
	int T=0,n=2.5e5;printf("%d %d\n",T,n);
	std::vector<int> p(n);std::iota(p.begin(),p.end(),1);
	std::shuffle(p.begin(),p.end(),rnd);
	for(int i=0;i<n;++i)printf("%d%c",p[i]," \n"[i+1==n]);
	std::shuffle(p.begin(),p.end(),rnd);
	for(int i=0;i<n;++i)printf("%d%c",p[i]," \n"[i+1==n]);
	int q=2.5e5;printf("%d\n",q);
	for(int i=1;i<=q;++i){
		int l=rnd()%n+1,r=rnd()%n+1;if(l>r)std::swap(l,r);
		printf("%d %d\n",l,r);
	}
	return 0;
}
