#include <bits/stdc++.h>

using namespace std;
typedef unsigned long long ul;



void solve2(int* k, int* i, int* j, int* res, vector<int>& num)
{
    int s = *j;
    *j = *j + 3;
    while(*k > 0){
        if((((*j) - s) * ((*j) - s - 1) * ((*j) - s - 2)) / 6 <= (*k)){
            if((((*j) - s + 1) * ((*j) - s) * ((*j) - s - 1)) / 6 <= (*k)){
                (*res)++;
                (*j)++;
            }else{
                *k = *k - (((*j - s) * (*j - s - 1) * (*j - s - 2)) / 6);
                num.push_back((*j - s));
                return;
            }
        }
    }
}

int main(void)
{
    ios_base::sync_with_stdio(false);
    int k = 100000000;
    //scanf("%d",&k);

    int i = 0, j = 0;
    vector<int> num;
    int temp = k, res = 0;


    while(k > 0){
        res += 3;
        solve2(&k, &i, &j, &res, num);
        i++;
    }

    k = temp;
    j = 0;
    printf("%d\n", res);
    for(i = 0; i < (int)num.size(); ++i){
        int s = j;
        while(j - s != num[i]){
            printf("%d %d\n", i * i, j + i);
            j++;
        }
    }

}