{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eAlex missed the ballroom dance competition that he wanted to attend. So now he wants to know the pairs of dancers whose dancing he missed. He had several photos from the competition, so he chose one where all dancers are clearly visible and wrote down the coordinates of all \u003cstrong\u003eN\u003c/strong\u003e dancers (\u003cstrong\u003eN\u003c/strong\u003e is even).\u003c/p\u003e\n\n\u003cp\u003eThen Alex determined the pairs of dancers by the following algorithm: from not yet paired dancers he chooses two closest (to each other) dancers and assumes that they dance together as a pair. Should he find several pairs of dancers with the same minimum distance between dancers, he chooses lexicographically smallest pair (Alex enumerated dancers by integer numbers from \u003cstrong\u003e1\u003c/strong\u003e to \u003cstrong\u003eN\u003c/strong\u003e, dancers are ordered inside a pair, one with lower number goes first). You are asked to help Alex to determine pairs of dancers.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eInput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eThe first line of input contains even integer \u003cstrong\u003eN\u003c/strong\u003e (\u003cstrong\u003e2\u003c/strong\u003e ≤ \u003cstrong\u003eN\u003c/strong\u003e ≤ \u003cstrong\u003e300\u003c/strong\u003e). Each \u003cstrong\u003ei\u003c/strong\u003e-th line of the next \u003cstrong\u003eN\u003c/strong\u003e lines contains two integers --- \u003cstrong\u003ex\u003c/strong\u003e and \u003cstrong\u003ey\u003c/strong\u003e coordinates of \u003cstrong\u003ei\u003c/strong\u003e-th dancer. All coordinates are less than \u003cstrong\u003e10\u003c/strong\u003e^8 by absolute value.\u003c/p\u003e\n\n\u003cp\u003e\u003ch2\u003eOutput\u003c/h2\u003e\u003c/p\u003e\n\n\u003cp\u003eYou should output \u003cstrong\u003eN\u003c/strong\u003e/\u003cstrong\u003e2\u003c/strong\u003e lines. Each line must contain numbers of dancers in the corresponding pair. The first number in a line should be less than the second. Lines must be sorted in the lexicographically ascending order.\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\u003e6\n0 2\n3 2\n0 0\n1 0\n0 -2\n2 -2\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e1 2\n3 4\n5 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}