Very Strongly Connected Components
Time limit1sMemory limit1024 MB
Given N distinct integer points, find the maximum number of line segments you can draw between them so that segments meet only at endpoints.
Problem
Eunho studied strongly connected components. Inspired by that, Seonghyeon built a graph that connects many points with many line segments.
Given distinct points in the plane, you can build a graph in which each point is a vertex and each segment joining two of the points is an edge. Among the graphs in which no two segments meet except at their endpoints, the graph that uses the most segments is called the very strongly connected component of the given points. The number of edges of a very strongly connected component is called its strength.
Eunho wondered what the strength of the very strongly connected component of points is. He found the answer but left without telling it, because he had to study Chinese characters. Find it for him.
Given distinct points in the plane, print the strength of their very strongly connected component.
Input
The first line contains a positive integer .
From the second line onward, the -th of the lines contains the coordinates and of the -th point, separated by a space.
All coordinates are integers, and no two points have the same coordinates.
Output
Print the answer on the first line.
Constraints
- ()
- ()