There are $$$2 ^ n$$$ bugcats, each with a distinct attribute that can be represented as a number from $$$0$$$ to $$$2 ^ n - 1$$$.
These bugcats are to be paired into $$$2 ^ {n - 1}$$$ groups (each group contains exactly two bugcats) to dine in the restaurant. The bugcats are kind-hearted, so no bugcat appears in more than one group.
The restaurant has $$$2 ^ {n - 1} + 1$$$ tables for two, numbered from $$$1$$$ to $$$2 ^ {n - 1} + 1$$$. It is required that the XOR of the attribute values of the two bugcats at each table equals the table number.
However, Little B, who came to the restaurant alone, has already taken the quietest table $$$x$$$. (That is, table numbered $$$x$$$ cannot be used by the bugcats.)
Can you provide a pairing such that all bugcats in different groups can be seated at different tables for two, and Little B does not move?
The input consists of a single line with two integers $$$n, x$$$ ($$$1 \le n \le 20, 1 \le x \le 2 ^ {n - 1} + 1$$$).
The first line of output should be a string $$$\texttt{YES}$$$ or $$$\texttt{NO}$$$ indicating whether such a pairing exists.
If it exists, output $$$2 ^ {n - 1}$$$ lines, each containing two integers $$$x_i, y_i$$$, indicating that the bugcats with attributes $$$x_i$$$ and $$$y_i$$$ are in the same group.
The groups can be output in any order. If multiple solutions exist, output any one.
3 1
YES 5 7 0 3 2 6 1 4
2 1
NO
3 2
NO
1 2
YES 0 1