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 solve():
    n = int(input())
    arr = [list(map(int, input().split(" "))) for _ in range(n)]
    if n < 3:
        print(0)
        return

    outer_index = 0
    total = 0
    while outer_index < len(arr) - 2:
        
        inner_index = outer_index + 1
        while inner_index < len(arr) - 1:
            # Different x and y coordinate for the two points
            if arr[inner_index][0] != arr[outer_index][0] and arr[inner_index][1] != arr[outer_index][1]:
                total += len(arr) - 1 - inner_index
                break

            # Same coordinate
            elif arr[inner_index][0] == arr[outer_index][0] and arr[inner_index][1] == arr[outer_index][1]:
                inner_index += 1
                continue

            # Same x coordinate
            elif arr[inner_index][0] == arr[outer_index][0]:
                third_index = inner_index + 1

                while third_index < len(arr):
                    if arr[outer_index][0] != arr[third_index][0]:
                        total += 1
                    third_index += 1

            # Same y coordinate
            else:
                third_index = inner_index + 1

                while third_index < len(arr):
                    if arr[outer_index][1] != arr[third_index][1]:
                        total += 1
                    third_index += 1                

            inner_index += 1


        outer_index += 1
    print(total)

solve()