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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include <bitset>
#include <iostream>
#include <vector>
#include <string>
#include <unordered_map>

const int n = 90;
std::bitset<32> bits;
int k;

void print_start()
{
	std::cout << n << std::endl;
	std::cout << "88 89\n3 4\n5 6\n5 6\n7 8\n7 8\n9 10\n9 10\n11 12\n11 12\n13 14\n13 14\n15 16\n15 16\n17 18\n17 18\n19 20\n19 20\n21 22\n21 22\n23 24\n23 24\n25 26\n25 26\n27 28\n27 28\n29 30\n29 30\n31 32\n31 32\n33 34\n33 34\n35 36\n35 36\n37 38\n37 38\n39 40\n39 40\n41 42\n41 42\n43 44\n43 44\n45 46\n45 46\n47 48\n47 48\n49 50\n49 50\n51 52\n51 52\n53 54\n53 54\n55 56\n55 56\n57 58\n57 58\n59 60\n59 60\n90 -1\n90 -1\n";
}
void print_end()
{
	std::cout << "61 62\n63 64\n65 66\n67 68\n69 70\n71 72\n73 74\n75 -1\n76 77\n78 79\n80 81\n82 83\n84 85\n86 87\n-1 -1";
}

void print_middle()
{
	int vertex = 61;
	int upper_vertex = 2;
	for(int bit = 29; bit >= 0; bit -= 2)
	{
		if(bits.test(bit))
			std::cout <<  upper_vertex << ' ';
		else
			std::cout << "-1 ";
		upper_vertex += 2;
		if(bit - 1 >= 0 && bits.test(bit - 1))
			std::cout << upper_vertex << '\n';
		else
			std::cout << " -1" << '\n';

		upper_vertex += 2;
		vertex++;
	}
}

int main()
{
    std::iostream::sync_with_stdio(false);
	std::cin >> k;
	bits = std::bitset<32>(k);

	print_start();
	print_middle();
	print_end();
    return 0;
}