#include<bits/stdc++.h>
#define LL long long
using namespace std;
inline LL read(){
	LL res=0,fl=1;
	char ch=getchar();
	while(!(ch>='0' && ch<='9')){
		if(ch=='-')fl=-1;
		ch=getchar();
	}
	while(ch>='0' && ch<='9')res=res*10+ch-'0',ch=getchar();
	return res*fl;
}
const LL N=1e5+5;
int main(){
	freopen("data.in","w",stdout);
//	freopen(".out","w",stdout);
	int n=1000;
	cout<<"1 0\n";
	cout<<n<<' '<<n<<" 1 1\n";
	for(int i=1;i<=n;i++)cout<<0;
	cout<<'\n';
	for(int i=2;i<n;i++){
		cout<<0;
		for(int j=2;j<=n;j++)cout<<1;
		cout<<'\n';
	}
	for(int i=1;i<=n;i++)cout<<0;
	cout<<'\n';
	return 0;
}
