PivotOJ

Empty Quadrilaterals

시간 제한: 2000ms메모리 제한: 1024MB출처: ICPC Asia Seoul Regional 2022BOJ 26104

문제

A quadrilateral is a polygon with exactly four distinct corners and four distinct sides, without any crossing between its sides. In this problem, you are given a set PP of nn points in the plane, no three of which are collinear, and asked to count the number of all quadrilaterals whose corners are members of the set PP and whose interior contains no other points in PP.

For example, assume that PP consists of five points as shown in the left of the figure above. There are nine distinct quadrilaterals in total whose corners are members of PP, while only one of them contains a point of PP in its interior, as in the right of the figure above. Therefore, there are exactly eight quadrilaterals satisfying the condition and your program must print out 88 as the correct answer.

입력

Your program is to read from standard input. The input starts with a line containing an integer nn (1 ≤ n ≤ 300), where nn denotes the number of points in the set PP. In the following nn lines, each line consists of two integers, ranging from 109-10^9 to 10910^9, representing the coordinates of a point in PP. There are no three points in PP that are collinear.

출력

Your program is to write to standard output. Print exactly one line consisting of a single integer that represents the number of quadrilaterals whose corners are members of the set PP and whose interior contains no other points in PP.

예제

예제 1

입력
5
0 0
2 4
6 2
6 -2
7 3
출력
8

예제 2

입력
4
0 0
10 0
5 10
3 2
출력
3

예제 3

입력
10
10 10
1 0
4 8
-1 -4
-7 -4
-3 2
5 -10
-10 -5
1 1
5 -3
출력
170
코드를 제출하려면 로그인하세요.