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

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    int y = -1000000000, x = 1000000000;
    vector<pair<int,int>> pos;
    for(int i = 1; i <= 2000 && pos.size() < 1000000; i++){
        for(int j = 1; j < i && pos.size() < 1000000; j++){
            if(__gcd(j, i) != 1)continue;
            for(int k = j; k <= 1000 && pos.size() < 1000000; k += i){
                pos.emplace_back(-i, k);
            }
        }
    }
    sort(pos.begin(), pos.end(), [&](pair<int,int> lhs, pair<int,int> rhs){
        return (ll)(lhs.first) * rhs.second > (ll)(lhs.second) * rhs.first;
    });
    cout << pos.size() << '\n';
    for(int i = 0; i < pos.size(); i++){
        x += pos[i].first, y += pos[i].second;
        assert(-1000000000 <= x && x <= 1000000000);
        assert(-1000000000 <= y && y <= 1000000000);
        cout << x << " " << y << '\n';
    }
    //cerr << "ok" << '\n';
}