G. Generating Polygons
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Geosé is preparing a problem for the upcoming ICPC Grand Prix of Solidland competition. He is busy writing the model solution and needs your help generating the tests.

The test should consist of a simple polygon with $$$n$$$ vertices of integer coordinates and area equal to $$$A$$$. Recall that a polygon is simple if it has no holes and its boundary does not intersect itself. Additionally, the polygon should not contain any internal angle equal to $$$180^{\circ}$$$.

Build a polygon that satisfies the required constraints, or determine that it does not exist.

Input

Each test contains multiple test cases. The first line contains the number of test cases $$$(1 \leq t \leq 1,666)$$$. The description of the test cases follows.

The first line of each test case contains two integers $$$n$$$ and $$$A$$$ ($$$3 \leq n \leq 5000$$$ and $$$1 \leq A \leq 10^{8}$$$).

It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$5000$$$.

Output

For each test case, print "No" if such a Polygon can not be built. Otherwise, print "Yes" followed by $$$n$$$ lines with the coordinates of the vertices of the polygon in clockwise or counterclockwise order. The coordinates of the vertices should be integers with absolute value not exceeding $$$10^9$$$.

If there are multiple solutions, print any of them.

Example
Input
4
4 100
5 10
6 30
10 1
Output
Yes
0 0
0 10
10 10
10 0
Yes
0 0
2 0
3 2
1 4
-1 2
Yes
1 0
4 0
6 3
4 6
1 6
-1 3
No