var
	n, m, i: longint;
	a: array [1..100] of longint;
begin
	randseed := 153902347;

	n := 30;
	m := 30;

	for i := 1 to n do begin
		a[i] := 1 shl random(30);
	end;

	writeln(n, ' ', m);
	for i := 1 to n do begin
		write(a[i]);
		if (i < n) then
			write(' ');
	end;
	writeln;
end.