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

public class TestsGen extends Thread {

	final int NMAX = (int) 1e5;
	final int AMAX = (int) 1e9;
	final int LMAX = (int) 1e5;

	class Test {
		int n, k;
		int A, B;
		int[] a;
		
		public Test() {
			
		}
		
		public Test(int nn, int kk, int AA, int BB, int[] aa) {
			n = nn;
			k = kk;
			A = AA;
			B = BB;
			a = aa;
		}
		

		public void doCheck() {
			My_Assert(1 <= n && n <= NMAX, "n is out of range: " + n);
			My_Assert(0 <= k && k <= n, "k is out of range: " + k);
			
			for (int i = 0; i < n; i++) {
				My_Assert(1 <= a[i] && a[i] <= AMAX, "a[" + i
						+ "] is out of range: " + a[i]);
			}

			My_Assert(1 <= A && A <= AMAX, "A is out of range: " + A);
			My_Assert(1 <= B && B <= AMAX, "B is out of range: " + B);
			My_Assert(0 <= B - A && B - A <= LMAX, "B - A is out of range: "
					+ (B - A));
		}

		public void doPrint(PrintWriter out) {
			out.println(n + " " + k);
			for (int i = 0; i < n; i++)
				out.print(a[i] + " ");
			out.println();
			out.println(A + " " + B);
		}
	}

	private int testCount = 0;

	private void write(Test test) {
		try {
			testCount++;
			PrintWriter out = new PrintWriter(testCount / 10 + "" + testCount
					% 10);
			test.doCheck();
			test.doPrint(out);
			out.flush();
			out.close();
		} catch (Exception ex) {
			throw new RuntimeException(ex);
		}
	}

	Test randomSmallTest() {
		Test ans = new Test();
		ans.n = rand.nextInt((int) 1e4);
		ans.k = rand.nextInt(10);
		ans.A = rand.nextInt((int) 1e5);
		ans.B = ans.A + rand.nextInt((int) 1e4);
		ans.a = new int[ans.n];
		for (int i = 0; i < ans.n; i++)
			ans.a[i] = 1 + rand.nextInt(ans.B);
		
		return ans;
	}

	Test randomMediumTest() {
		Test ans = new Test();
		ans.n = NMAX / 2 + rand.nextInt(NMAX / 2);
		ans.k = rand.nextInt(23);
		ans.A = 1000000 + rand.nextInt((int) 1e8);
		ans.B = ans.A + LMAX / 2 + rand.nextInt(LMAX / 2);
		ans.a = new int[ans.n];
		for (int i = 0; i < ans.n; i++)
			ans.a[i] = 100 + rand.nextInt((int) 1e6);
		return ans;
	}
	
	Test randomBigTest() {
		Test ans = new Test();
		ans.n = NMAX / 2 + rand.nextInt(NMAX / 2);
		ans.k = ans.n / 21 + rand.nextInt(ans.n / 27); // 21 27 = 3
		ans.A = rand.nextInt((int) 1e8);
		ans.B = ans.A + LMAX / 2 + rand.nextInt(LMAX / 2);
		ans.a = new int[ans.n];
		for (int i = 0; i < ans.n; i++)
			ans.a[i] = 1 + rand.nextInt(100);
		return ans;
	}

	void My_Assert(boolean b, String s) {
		if (!b)
			throw new AssertionError(s);
	}

	Random rand;
	final long SEED = 4815162342L;
	
	public void run() {
		rand = new Random(SEED);
		for (int i = 0; i < 8; i++) 
			write(randomSmallTest());
		
		for (int i = 8; i < 12; i++)
			write(randomMediumTest());
				
		for (int i = 12; i < 20; i++)
			write(randomBigTest());
		
	}

	public static void main(String[] args) throws IOException {
		new TestsGen().start();
	}
}
