Vanya got bored and he painted *n* distinct points on the plane. After that he connected all the points pairwise and saw that as a result many triangles were formed with vertices in the painted points. He asks you to count the number of the formed triangles with the non-zero area.
The first line contains integer *n* (1 ≤ *n* ≤ 2000) — the number of the points painted on the plane. 

Next *n* lines contain two integers each *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub> ( - 100 ≤ *x*<sub class="lower-index">*i*</sub>, *y*<sub class="lower-index">*i*</sub> ≤ 100) — the coordinates of the *i*-th point. It is guaranteed that no two given points coincide.
def slope(pointA, pointB):
    if pointA[0] == pointB[0]:
        return float('inf')
    else:
        return (pointB[1] - pointA[1]) / (pointB[0] - pointA[0])


def CF552D():
    N = int(input())
    if N < 3: return 0
    points = [tuple(map(int, input().split())) for _ in range(N)]

    # Find the slope between all pairs of points and merge the same lines
    slopes = {}  # (slope, list(sets))
    for i in range(N):
        for j in range(i + 1, N):
            m = (points[j][1] - points[i][1]) / (points[j][0] - points[i][0]) if points[j][0] != points[i][0] else 'inf'
            if m in slopes:
                lines = slopes[m]
                for k, line in enumerate(lines):
                    if i in line or j in line:
                        line.add(i)
                        line.add(j)
                        lines[k] = line
                        slopes[m] = lines
                        break
                # else:
                #     lines.append(set([i, j]))
                #     slopes[m] = lines
            else:
                slopes[m] = [set([i, j])]

    # At the end of it all do we need to merge the same lines again? Hopefully not.
    total = N * (N - 1) * (N - 2) // 6
    for _, lines in slopes.items():
        k = [len(line) for line in lines]
        k = sum([n*(n-1)*(n-2)//6 for n in k if n >= 3])
        total -= k

    return total


if __name__ == '__main__':
    res = CF552D()
    print(res)
