#include <cstdio>
#include <ctime>
#include <algorithm>
#include <cassert>

using namespace std;

const int maxn = 20;
const int maxval = 20;

int main()
{
  freopen("../stock.in", "w", stdout);
  srand(time(NULL));
  int n = rand() % maxn + 1;
  printf("%d\n", n);
  for (int i = 0; i < n; i++)
  {
    int l = rand() % (maxval - 1) + 1;
    int r = l + rand() % (maxval - l) + 1;
    assert(l >= 1 && l < r && r <= maxval);
    printf("%d %d\n", l, r);
  }
}