D. Florescent Constellations
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

While staring at the night sky, Johnny began looking for collections of stars in the sky that have a flower-like appearance. In particular, a group of at least three stars in the sky is called a florescent constellation if there exists a circle such that the following two conditions hold:

  • All stars in the constellation lie on the edge of the circle.
  • The stars in the constellation are equally spaced around the circle.

Since Johnny wants to find all florescent constellations in the night sky, help him to identify the number of such constellations, so he knows when to stop looking! Two constellations are considered distinct if they differ by at least one star.

The night sky can be modeled as a set of $$$n$$$ stars in a 2D plane numbered from $$$1$$$ to $$$n$$$, with the $$$i$$$-th star located at the integer coordinates $$$(x_i, y_i)$$$. No two stars are located in the same position.

Input

The first line contains one integer $$$n$$$ ($$$1 \le n \le 1000$$$) — the number of stars in the night sky.

The next $$$n$$$ lines each contain two integers, with the $$$i$$$-th line containing $$$x_i$$$ and $$$y_i$$$ ($$$-10^9 \le x_i, y_i \le 10^9$$$) — the coordinates of the $$$i$$$-th star in the night sky.

Output

Output a single integer, the number of florescent constellations in the night sky.

Example
Input
5
0 0
0 1
1 0
2 1
1 2
Output
1
Note

In the first test case, there is one florescent constellation. In particular, stars $$$2$$$, $$$3$$$, $$$4$$$, and $$$5$$$ form a florescent constellation, as they all lie on a single circle and are equally spaced around that circle.