401828: GYM100534 K Censorship!

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

K. Censorship!time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are so lucky because the story of this problem which was about cheating has been censored by the manager of the contest, and you don't have to read that long story! Given n points in a 2D plane, You have to use these points to make a magical shape like a bow tie. Our bow tie like shape consists of two triangles that share a vertex. We call it center point. Now you may want to know a little more about this bow tie like shape. As you can see in the picture this shape is made up of 5 points and 6 segments that make two triangles. Four of these six segments must share the center point as a point and these segments must be in two lines that intersect each other in center point. One another important condition to make a bow tie like shape is that no other points are allowed to be inside or on the segments of the shape. In this problem you must count the number of different bow ties like shapes that can be drawn using the points.

Input

The first line of input is the number of points in plane, n (5 ≤ n ≤ 500). In the next lines there are n lines with two integer numbers that are coordinates of points, xi and yi ( - 104 ≤ xi, yi ≤ 104). The points are different, but clearly some points maybe collinear.

Output

Output the number of different bow tie like shapes that we can make using this set of points.

ExamplesInput
5
0 0
1 0
0 1
-1 0
0 -1
Output
2
Input
7
1 1
4 -2
2 2
0 2
-1 -1
1 0
1 2
Output
5

加入题单

算法标签: