#include <bits/stdc++.h>
#include <windows.h>
using namespace std;

mt19937 rng(GetTickCount());

int rnd(int l, int r) {
	return rng() % (r - l + 1) + l;
}

int main() {
	freopen("match.in", "w", stdout);
	int T = 0, n = 2.5e5;
	printf("%d %d\n", T, n);
	for (int i = 1; i <= n; i++) printf("%d ", i);
	puts("");
	for (int i = 1; i <= n; i++) printf("%d ", i);
	puts("");
	int q = 5;
	printf("%d\n", q);
	while (q--) {
		int l = rnd(1, n), r = rnd(1, n);
		if (l > r)
			swap(l, r);
		printf("%d %d\n", l, r);
	}
	return 0;
}