#include <cassert>
#include <cstdlib>
#include <iostream>

using namespace std;

// Strictly increasing left endpoints, but no containments at all.
// This keeps every component alive forever, which is a worst case for
// mono solutions that scan or rebuild all current components each step.

int main(int argc, char* argv[]) {
    assert(argc == 3);
    int n = atoi(argv[1]);
    int seed = atoi(argv[2]);
    (void)seed;

    cout << n << '\n';
    for (int i = 0; i < n; i++) {
        cout << 2 * i << ' ' << 2 * i + 1 << '\n';
    }

    return 0;
}
