Magical Barrier
시간 제한2초메모리 제한1024 MB
세 점이 일직선 위에 있지 않은 N개의 점이 주어질 때, 각 쌍이 선분을 이루며 한 선분과 교차하는 다른 선분 수의 최댓값을 구한다.
문제
There are power sources, numbered from to , scattered around the ICPC Kingdom. Power source is uniquely located at coordinate in a 2D Cartesian plane such that there are no three power sources located in a straight line.
For each pair of distinct power sources and that satisfies , a magical barrier forms as a line segment that spans from to .
You noticed a strange phenomenon. When two distinct magical barriers are intersecting, then both magical barriers are somewhat strengthened. To simplify things, you define the strength of a magical barrier as the number of magical barriers other than that intersects with . Two distinct magical barriers are intersecting if and only if there exists exactly one point that lies on both magical barriers while none of the power sources are located at .
You want to find the strength of the strongest magical barrier in the ICPC Kingdom.
입력
Input begins with an integer () representing the number of power sources. Each of the next lines contains integers () representing the location of power source . It is guaranteed that the location of each power source is unique, and there are no three power sources located in a straight line.
출력
Output an integer in a single line representing the strength of the strongest magical barrier.