Please subscribe to the official Codeforces channel in Telegram via the link: https://t.me/codeforces_official.
×

No tag edit access

D. Number of Parallelograms

time limit per test

4 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given *n* points on a plane. All the points are distinct and no three of them lie on the same line. Find the number of parallelograms with the vertices at the given points.

Input

The first line of the input contains integer *n* (1 ≤ *n* ≤ 2000) — the number of points.

Each of the next *n* lines contains two integers (*x*_{i}, *y*_{i}) (0 ≤ *x*_{i}, *y*_{i} ≤ 10^{9}) — the coordinates of the *i*-th point.

Output

Print the only integer *c* — the number of parallelograms with the vertices at the given points.

Example

Input

4

0 1

1 0

1 1

2 0

Output

1

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Dec/12/2018 02:46:49 (f2).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|