1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include<bits/stdc++.h>
using namespace std;
int pol[105][2];
void pre()
{
    for(int x=1;x<=89;x++)
        for(int y=0;y<2;y++)
            pol[x][y]=-1;
    for(int x=1;x<=85;x+=3)
    {
        pol[x][0] = x+1;
        pol[x+1][0] = x+2;
        pol[x+1][1] = x+3;
        pol[x+2][0] = x+3;
    }
}
int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    pre();
    int a;
    cin>>a;
    int act = 1;
    for(int x=1;x<=88;x+=3)
    {
        if(act&a)
            pol[x][1] = 89;
        act*=2;
    }

    cout<<89<<'\n';
    for(int x=1;x<=89;x++)
        cout<<pol[x][0]<<" "<<pol[x][1]<<'\n';
	return 0;
}