Rectangles-1#1479

Rectangles-1

8 seconds
64 megabytes
Hard

Given distinct points on the plane, find the number of different non-degenerate rectangles whose vertices are the given points.

Note that the sides of the rectangles do not have to be parallel to the coordinate axes.

Input

The first line contains the integer (1 \leq n \leq 4063). Each of the next lines contains a pair of integers x_i, y_i (0 \leq x_i, y_i \leq 32000) — the coordinates of the points.

Output

Output a single number: the number of such rectangles.

Examples

Example 1

Loading
Loading