#include <stdio.h>
#include <bits/stdc++.h>

using namespace std;

bool _u;

namespace AK {

typedef long long ll;
typedef double db;

#define rep(i, l, r) for(int i = l, i##end = r; i <= i##end; ++ i)
#define per(i, l, r) for(int i = l, i##end = r; i >= i##end; -- i)
#define pc putchar

template <class T>
inline void chmax(T &x,const T &y) {
	if(x < y) x = y;
}

template <class T>
inline void chmin(T &x, const T &y) {
	if(y < x) x = y;
}

inline int read() {
	int res = 0; char ch = getchar(); bool f = 1;
	for(; ch < '0' || ch > '9'; ch = getchar())
		if(ch == '-') f = 0;
	for(; ch >= '0' && ch <= '9'; ch = getchar())
		res = res * 10 + ch - '0';
	return f ? res : -res;
}


void Main() {
	int n = 1000, m = 1000;
	mt19937 rng(time(0));
	printf("1 1\n");
	printf("%d %d %d %d\n", n, m, 114514, 1919810);
	rep(i, 1, n) {
		rep(j, 1, m) pc('0');
		pc(10);
	}
}

}

bool _v;

signed main() {
	//freopen("plant.in", "r", stdin);
	freopen("plant.in", "w", stdout);
	clock_t st = clock();
	AK :: Main();
	printf("==============================\n");
	cerr << "time = " << (clock() - st) * 1.0 / CLOCKS_PER_SEC << endl;
	cerr << "space = " << (&_u - &_v) / 1048576.0 << endl;
	return 0;
}
