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
#include <iostream>

using namespace std;

int main(int argc, char* argv[]) {
	ios_base::sync_with_stdio (false);
	int64_t n;
	int i;
	cin >> n;

	cout << "95\n";
	cout << "2 -1\n";
	for (i = 2; i <= 32; ++i) {
		if(!!(n & (1 << (32 - i))))
			cout << i + 32 << " " << i + 1 << "\n";
		else
			cout << "-1 " << i + 1 << "\n";
	}
	cout << "-1 -1\n";
	for (i = 34; i < 64; ++i)
		cout << i + 31 << " " << i + 1 << "\n";
	cout << "-1 95\n";
	for (i = 65; i < 95; ++i)
		cout << "-1 " << i - 30 << "\n";
	cout << "-1 -1\n";
}