{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"There are **n** distinct points on the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In other words, find the number of 4-element subsets of these points that can be written as **{A, B, C, D}** such that **AB || CD**, and **BC || AD**."}},{"title":"Input","value":{"format":"MD","content":"Input starts with an integer **T (\u0026#8804; 15)**, denoting the number of test cases.\n\nThe first line of each test case contains an integer **n (1 \u0026#8804; n \u0026#8804; 1000)**. Each of the next **n** lines, contains **2** space-separated integers **x** and **y** (the coordinates of a point) with magnitude (absolute value) of no more than **10\u003csup\u003e9\u003c/sup\u003e**. For each case, no four points will be on a straight line."}},{"title":"Output","value":{"format":"MD","content":"For each case, print the case number and the number of parallelograms that can be formed."}},{"title":"Sample","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\n6\n0 0\n2 0\n4 0\n1 1\n3 1\n5 1\n7\n-2 -1\n8 9\n5 7\n1 1\n4 8\n2 0\n9 8\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase 1: 5\nCase 2: 6\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}