Package for this problem was not updated by the problem writer or Codeforces administration after we’ve upgraded the judging servers. To adjust the time limit constraint, solution execution time will be multiplied by 2. For example, if your solution works for 400 ms on judging servers, then value 800 ms will be displayed and used to determine the verdict.

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ACM-ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

B. Number of Triplets

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputYou are given *n* points on a plane. All points are different.

Find the number of different groups of three points (*A*, *B*, *C*) such that point *B* is the middle of segment *AC*.

The groups of three points are considered unordered, that is, if point *B* is the middle of segment *AC*, then groups (*A*, *B*, *C*) and (*C*, *B*, *A*) are considered the same.

Input

The first line contains a single integer *n* (3 ≤ *n* ≤ 3000) — the number of points.

Next *n* lines contain the points. The *i*-th line contains coordinates of the *i*-th point: two space-separated integers *x*_{i}, *y*_{i} ( - 1000 ≤ *x*_{i}, *y*_{i} ≤ 1000).

It is guaranteed that all given points are different.

Output

Print the single number — the answer to the problem.

Examples

Input

3

1 1

2 2

3 3

Output

1

Input

3

0 0

-1 0

0 1

Output

0

Codeforces (c) Copyright 2010-2018 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Jun/20/2018 18:20:32 (d3).

Desktop version, switch to mobile version.

User lists

Name |
---|