#include <cstdio>
#include <ctime>
#include <algorithm>
#include <map>

using namespace std;

const int maxn = 10;
const int maxcoord = 100;

int main()
{
  freopen("connections.in", "w", stdout);
  srand(time(NULL));
  int n = rand() % maxn + 1;
  int k = n;
  printf("%d\n", n);
  map <int, int> wasl, wasr;
  for (int i = 0; i < n; i++)
  {
    int l = rand() % maxcoord + 1;
    int r = rand() % maxcoord + l;
    while (wasl[l] || wasr[r])
    {
      l = rand() % maxcoord + 1;
      r = rand() % maxcoord + l;
    } 
    printf("%d %d\n", l, r);
    wasl[l] = 1;
    wasr[r] = 1;
  }
  printf("%d\n", k);
  for (int i = 0; i < k; i++)
    printf("%d\n", i + 1);
}