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

public class gen_random {
	public static void main(String[] args) throws IOException {
		Random rand = new Random(230108);
		int maxn = 10;
		int maxk = 200;
		for (int k = 3; k <= 20; k++) {
			PrintWriter out = new PrintWriter(new File(k / 10 + "" + k % 10));
			int n = rand.nextInt(maxn) + 1;
			int m = rand.nextInt(maxn) + 1;
			out.println(n + " " + m);

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

			out.close();
		}
	}

}