{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eDo you think that drawing polygons is easy? This is not the case when you have some restrictions.\u003c/p\u003e\n\n\u003cp\u003eIn this problem all you have to do is just to draw a polygon. It must have exactly \u003cstrong\u003eN \u003c/strong\u003evertices. It must contain no self-intersections. No three consecutive vertices of the polygon must be collinear. All coordinates of its vertices must be integers between \u003cstrong\u003e0\u003c/strong\u003e and \u003cstrong\u003e10 000\u003c/strong\u003e, inclusive. Easy, right?\u003c/p\u003e\n\n\u003cp\u003eThere is one more small restriction though. The number of inner angles of this polygon equal to \u003cstrong\u003e90°\u003c/strong\u003e must be as large as possible under these constraints. What do you think about it now?\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eContains the number of test cases \u003cstrong\u003eT\u003c/strong\u003e (\u003cstrong\u003e1\u003c/strong\u003e ≤ \u003cstrong\u003eT\u003c/strong\u003e ≤ \u003cstrong\u003e30\u003c/strong\u003e) followed by \u003cstrong\u003eT\u003c/strong\u003e integer numbers \u003cstrong\u003eN\u003c/strong\u003e (\u003cstrong\u003e3\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e ≤ \u003cstrong\u003e1000\u003c/strong\u003e).\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eFor each test case print the maximum possible number of inner angles equal to \u003cstrong\u003e90°\u003c/strong\u003e followed by \u003cstrong\u003eN\u003c/strong\u003e pairs of integers -the coordinates of the vertices of the polygon in either clockwise or counterclockwise order. Of course, more than one solution is possible, so output any of them.\u003c/p\u003e\n\n"}},{"title":"Example","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e2\n4\n6\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e4\n0 0\n1 0\n1 1\n0 1\n\n5\n1 1\n3 3\n5 1\n4 0\n3 1\n2 0\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}