#agc035c. [agc035_c]Skolem XOR Tree
[agc035_c]Skolem XOR Tree
Problem Statement
You are given an integer . Determine if there exists a tree with vertices numbered to satisfying the following condition, and show one such tree if the answer is yes.
- Assume that, for each integer between and (inclusive), Vertex and have the weight . Then, for each integer between and , the bitwise XOR of the weights of the vertices on the path between Vertex and (including themselves) is .
Constraints
- is an integer.
Input
Input is given from Standard Input in the following format:
Output
If there exists a tree satisfying the condition in the statement, print Yes
; otherwise, print No
. Then, if such a tree exists, print the edges of such a tree in the subsequent lines, in the following format:
Here each pair (, ) means that there is an edge connecting Vertex and . The edges may be printed in any order.
Sample Input 1
3
Sample Output 1
Yes
1 2
2 3
3 4
4 5
5 6
-
The sample output represents the following graph:
Sample Input 2
1
Sample Output 2
No
- There is no tree satisfying the condition.