import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.util.Random;

public class GenAll {

	public static void main(String[] args) {
		Random r = new Random(255);
		int number = 50;
		for (int test = 1; test <= number; test++) {
			try {
				PrintWriter out = new PrintWriter((test < 10 ? "0" : "") + test);
				switch (test) {
				case 1:
					out.println("4 2");
					out.println("1 2 3 4");
					out.println("5 5");
					break;
				case 2:
					out.println("4 2");
					out.println("1 2 3 4");
					out.println("1 8");
					break;
				case 3:
					out.println("1 1");
					out.println("1000000000");
					out.println("1000000000");
					break;
				case 4:
					out.println("1 1");
					out.println("1000000000");
					out.println("-1000000000");
					break;
				case 5:
					out.println("2 1");
					out.println("1000000000 -1000000000");
					out.println("0");
					break;
				/*
				 * case 6:
				 * 
				 * out.println("10 10"); int[] a = new int[10]; for (int i = 0;
				 * i < a.length; i++) { a[i] = r.nextInt(2000000001) -
				 * 1000000000; } for (int i = 0; i < a.length; i++) {
				 * out.print(a[i] + " "); } out.println(); for (int i = 0; i <
				 * a.length; i++) { int j = r.nextInt(10); int tmp = a[i]; a[i] =
				 * a[j]; a[j] = tmp; } for (int i = 0; i < a.length; i++) {
				 * out.print(a[i] + " "); } break;
				 */case 7:
					out.println("10 1");
					for (int i = 0; i < 10; i++) {
						out.print((1000000000 / 10) + " ");
					}
					out.println();
					out.println("1000000000");
					break;
				case 8:
					out.println("2 5");
					out.println("5 6");
					out.println("6 6 6 1 3");
					break;
				case 9:
					out.println("3 2");
					out.println("1 1 1");
					out.println("3 0");
					break;
				default:
					int n;
					int k;
					long[] b,
					s;
					while (true) {
						n = r.nextInt(10) + 1;
						b = new long[n];
						for (int i = 0; i < b.length; i++) {
							b[i] = r.nextInt(2000000001) - 1000000000;
						}
						s = new long[10];
						k = 0;
						for (int i = 0; i < b.length; i++) {
							if (k == 0 || r.nextInt(3) < 2) {
								s[k++] = b[i];
							} else {
								s[r.nextInt(k)] += b[i];
							}
						}
						if (r.nextInt(5) < 3) {
							if (k == 10 || r.nextBoolean()) {
								if (k == 1 || r.nextBoolean()) {
									int i = 0;
									int j = 0;
									while (i == j && k > 1) {
										i = r.nextInt(k);
										j = r.nextInt(k);
									}
									s[i] += 1;
									s[j] -= 1;
								} else {
									k--;
								}
							} else {
								if (k == 1 || r.nextBoolean()) {
									k++;
								} else {
									k--;
								}
							}
						}
						long q = 1;
						for (int i = 0; i < k; i++) {
							q *= n;
						}
						for (int i = 0; i < k; i++) {
							if (Math.abs(s[i]) > 1000000000) {
								q = 1000000000;
								break;
							}
						}
						if (q <= 16777216) {
							break;
						}
						// System.out.println(q);
					}
					out.println(n + " " + k);
					for (int i = 0; i < n; i++) {
						out.print(b[i] + " ");
					}
					out.println();
					for (int i = 0; i < k; i++) {
						out.print(s[i] + " ");
					}
					break;
				}

				out.close();
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}
	}
}
