You are given two integers, the number of vertices N and area A. You need to construct a simple polygon of N vertices such that the area of the polygon is exactly 2A, and all the vertices have non-negative integer coordinates with value up to 109.
A simple polygon is one that:
The first line of the input gives the number of test cases, T. T lines follow. The first line of each test case contains two integers, N denoting the number of vertices and A, denoting double the required area of the polygon.
For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is IMPOSSIBLE if it is not possible to construct a polygon with the given requirements and POSSIBLE otherwise.
If you output POSSIBLE, output N more lines with 2 integers each. The i-th line should contain two integers X_i and Y_i which denote the coordinates of the i-th vertex. For each i, the coordinates should satisfy the 0≤X_i,Y_i≤109 constraints. Vertices of the polygon should be listed in consecutive order (vertex_i should be adjacent to vertex_i−1 and vertex_i+1 in the polygon).
If there are multiple possible solutions, you can output any of them.