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.
import math
import sys


def solve():
    n = int(sys.stdin.readline())

    h = {}
    r = []
    res = 0

    for i in range(n):
        x, y = map(int, sys.stdin.readline().split())
        for j in range(i):
            xi, yi = r[j]

            if x == xi:
                h[str(xi)] = 1 if str(xi) not in h else h[str(xi)] + 1

            else:
                if x < xi:
                    x, xi, y, yi = xi, x, yi, y

                dx, dy = (x - xi), (y - yi)
                g = math.gcd(abs(dx), abs(dy))
                dx, dy = dx // g, dy // g

                c = yi*dx-xi*dy
                z = dx
                gg = math.gcd(abs(c), abs(z))

                if gg != 0 and c != 0:
                    c,z = c//gg, z//gg
                    e = str(dy) + "#" + str(dx) + "#" + str(c) + "$" + str(z)
                else:
                    e = str(dy) + "#" + str(dx)+"#"+"0"

                h[e] = 1 if e not in h else h[e] + 1

        r.append((x, y))
    #print(h)
    for key in h:
        #print(key, h[key] * (n - int(math.sqrt(h[key]*2)) - 1))
        res += h[key] * (n - int(math.sqrt(h[key]*2)) - 1)

    print(res // 3)

    return


if __name__ == "__main__":
    solve()
