New Year and Castle Construction

모든 점 p와 4개 점 부분집합에 대해 p를 엄격히 감쌀 수 있는 사각형을 이루는 부분집합의 수를 세어 합을 출력한다.

어려움8기하조합론정렬투 포인터아직 제출이 없습니다시간 제한3초메모리 제한512 MB

문제

Kiwon's favorite video game is now holding a new year event to motivate the users! The game is about building and defending a castle, which led Kiwon to think about the following puzzle.

In a 2-dimension plane, you have a set s=(x_1,y_1),(x_2,y_2),,(x_n,y_n)s = \\{(x\_1, y\_1), (x\_2, y\_2), \ldots, (x\_n, y\_n)\\} consisting of nn distinct points. In the set ss, no three distinct points lie on a single line. For a point psp \in s, we can protect this point by building a castle. A castle is a simple quadrilateral (polygon with 44 vertices) that strictly encloses the point pp (i.e. the point pp is strictly inside a quadrilateral). 

Kiwon is interested in the number of 44-point subsets of ss that can be used to build a castle protecting pp. Note that, if a single subset can be connected in more than one way to enclose a point, it is counted only once. 

Let f(p)f(p) be the number of 44-point subsets that can enclose the point pp. Please compute the sum of f(p)f(p) for all points psp \in s.

입력

The first line contains a single integer nn (5n2,5005 \le n \le 2\\,500).

In the next nn lines, two integers x_ix\_i and y_iy\_i (109x_i,y_i109-10^9 \le x\_i, y\_i \le 10^9) denoting the position of points are given.

It is guaranteed that all points are distinct, and there are no three collinear points.

출력

Print the sum of f(p)f(p) for all points psp \in s.