#include<bits/stdc++.h>
using namespace std;
int read()
{
	int x=0,f=1;
	char c=getchar();
	while(c<'0'||c>'9')
	{
		if(c=='-')f=-1;
		c=getchar();
	}
	while(c>='0'&&c<='9')
	{
		x=x*10+c-'0';
		c=getchar();
	}
	return x*f;
}
const int MAXN=1;
int main()
{
	freopen("plant.in","w",stdout);
	printf("5 1\n");
	int t=5;
	while(t--)
	{
		printf("1000 1000 1 1\n");
		for(int i=1;i<=1000;i++)
		{
			for(int j=1;j<=1000;j++)printf("0");
			puts("");
		}
	}
	return 0;
}
