L. Pairing Bugcats
time limit per test
2 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

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?

Input

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$$$).

Output

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.

Examples
Input
3 1
Output
YES
5 7
0 3
2 6
1 4
Input
2 1
Output
NO
Input
3 2
Output
NO
Input
1 2
Output
YES
0 1