#include <cstdio>
#include <cassert>
#include <algorithm>
#include <vector>

using namespace std;

int orandseed;
void osrand( int rs ) { orandseed = rs; }
int orand() { return (orandseed = (orandseed * 301703 + 239017) & 0x7fffff) >> 8; }
int r( int a, int b ) { return ((orand() << 8) + orand()) % (b - a + 1) + a; }

vector <int> genSum( int num, int sum )
{
  vector <int> a(num);
  for (int i = 1; i < num; i++)
    a[i] = r(0, sum);
  a[0] = sum;
  sort(a.begin(), a.end());
  for (int i = num - 1; i > 0; i--)
    a[i] -= a[i - 1];
  return a;
}

const int maxN = 200;

int n, s[maxN], t[maxN];

void shuffle()
{
  for (int i = 0; i < n; i++)
  {
    int j = r(0, i);
    swap(t[i], t[j]);
    swap(s[i], s[j]);
  }
}

void out()
{
  printf("%d\n", n);
  for (int i = 0; i < n; i++)
    printf("%d %d\n", s[i], t[i]);
}

void gen( int argc, char *argv[] );

int main( int argc, char *argv[] )
{
  assert(argc >= 2);
  osrand(atoi(argv[1]));
  gen(argc - 2, argv + 2);
  shuffle();
  out();
  return 0;
}
