import java.io.*;
import java.util.*;

public class gen_max2 {
	public static void main(String[] args) throws IOException {
		Random rand = new Random(20488);
		int maxn = 750;
		int maxk = 1000;
		for (int k = 30; k <= 35; k++) {
			PrintWriter out = new PrintWriter(new File(k / 10 + "" + k % 10));
			int n = maxn;
			int m = maxn;
			out.println(n + " " + m);

			int l = rand.nextInt(2 * maxk + 1) - maxk;
			for (int i = 0; i < n; i++) {
				for (int j = 1; j < m; j++) {
					out.print(l + " ");
				}
				out.println(l);
			}

			out.close();
		}
	}

}