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
#include<bits/stdc++.h>
using namespace std;

int main()
{
    int k;
    cin >> k;

    cout << 100 << endl;
    for(int i = 1; i < 100; i++)
    {
        cout << i + 1 << " ";
        if(i%2 == 1)
        {
            if(k > 1)
                cout << i + 2;
            else
                cout << -1;
        }
        else
        {
            if(k > 1 && k%2 == 1)
                cout << 100;
            else
                cout << -1;
            k /= 2;
        }
        cout << endl;
    }
    cout << "-1 -1";

    return 0;
}