Quadrilaterals
Medium
Execution time limit is 3 seconds
Runtime memory usage limit is 256 megabytes
You are given N points in general position on a plane, meaning no two points are the same and no three points lie on a single straight line. Your task is to determine how many distinct convex quadrilaterals can be formed using these points as vertices.
Input
The first line of the input contains a single integer N (4 ≤ N ≤ 1500). Each of the following N lines contains two integers X_i and Y_i, representing the coordinates of a point. The absolute value of each coordinate does not exceed 10^8.
Output
Output a single integer representing the number of distinct convex quadrilaterals that can be formed with the given points as vertices.
Examples
Input #1
Answer #1
Submissions 65
Acceptance rate 14%