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

typedef long long ll;

ll rand_ll(ll a, ll b) {
  return a + (ll(rand()) << 32 | rand()) % (b - a + 1);
}

int main() {
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  srand(time(0));
  const int MAX_C = 1000000 - 10000;
  const ll MAX_VAL = 1e12;
  int C = MAX_C;
  cout << C << '\n';
  for (int i = 0; i < C; ++i) {
    ll l = rand_ll(1, MAX_VAL);
    ll r = rand_ll(l, min(MAX_VAL, l + 1000000)); // keep ranges somewhat reasonable
    cout << l << " " << r << '\n';
  }
  return 0;
}
