#include <bits/stdc++.h>
std::mt19937 rng(std::chrono::steady_clock::now().time_since_epoch().count());
int Rand(int l, int r) { return std::uniform_int_distribution(l, r)(rng); }
int a[250001];
int main() {
  std::ofstream fout("match.in");
  int n = Rand(3000, 3000);
  fout << "1 " << n << '\n';
  std::iota(a + 1, a + n + 1, 1);
  std::shuffle(a + 1, a + n + 1, rng);
  for (int i = 1; i <= n; i++) fout << a[i] << " \n"[i == n];
  std::shuffle(a + 1, a + n + 1, rng);
  for (int i = 1; i <= n; i++) fout << a[i] << " \n"[i == n];
  int q = 3000;
  fout << q << '\n';
  while (q--) {
    int l = Rand(1, n), r = Rand(1, n);
    if (l > r) std::swap(l, r);
    fout << l << ' ' << r << '\n';
  }
  return 0;
}