You are given two integers $$$n$$$ and $$$2s$$$. Please note that the second integer is denoted by $$$s$$$ multiplied by $$$2$$$, although it can still be either even or odd.
In the rectangular coordinate system $$$Oxy$$$, find any polygon with $$$n$$$ sides and $$$n$$$ vertices such that:
If there are no such polygons, report this.
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 20\,000$$$). The description of the test cases follows.
The only line of each test case contains two integers $$$n$$$ and $$$2s$$$ ($$$3 \le n \le 1000$$$, $$$1 \le 2s \le 10^6$$$): the number of vertices and the double area of a desired polygon.
It is guaranteed that the sum of $$$n$$$ over all test cases does not exceed $$$60\,000$$$.
For each test case, if a desired polygon does not exist, print the single word "NO" (without quotes).
Otherwise, in the first line, print the word "YES" (without quotes). In the $$$i$$$-th of the next $$$n$$$ lines, print two integers $$$x_i$$$ and $$$y_i$$$: the coordinates of the $$$i$$$-th vertex of a polygon that meets all the requirements. The vertices must be listed either clockwise or counterclockwise.
If there are multiple solutions, print any of them.
You may output the words in any case (upper or lower). For example, the strings "yEs", "yes", "Yes", and "YES" will be recognized as positive responses.
29 46 23
NO YES 1 1 2 2 2 3 1 4 5 4 6 1
In the first test case, we can show there are no $$$9$$$-gons with an area of $$$\frac{4}{2} = 2$$$ that meet all the requirements.
In the second test case, we have a desired $$$6$$$-gon with an area of $$$\frac{23}{2}$$$. Note that polygons may be non-convex.