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.
# Python3 implementation of the above approach
from collections import defaultdict
from math import gcd

# This function returns the
# required number of triangles
def countTriangles(P, N):

	# Hash Map to store the frequency of
	# slope corresponding to a point (X, Y)
	mp = defaultdict(lambda:0)
	ans = 0

	# Iterate over all possible points
	for i in range(0, N):
		mp.clear()

		# Calculate slope of all elements
		# with current element
		for j in range(i + 1, N):
			X = P[i][0] - P[j][0]
			Y = P[i][1] - P[j][1]

			# find the slope with reduced
			# fraction
			g = gcd(X, Y)
			X //= g
			Y //= g
			mp[(X, Y)] += 1
		
		num = N - (i + 1)

		# Total number of ways to form a triangle
		# having one point as current element
		ans += (num * (num - 1)) // 2

		# Subtracting the total number of
		# ways to form a triangle having
		# the same slope or are collinear
		for j in mp:
			ans -= (mp[j] * (mp[j] - 1)) // 2
	
	return ans

# Driver Code
if __name__ == "__main__":

	
	N = int(input())
	A = []
	for _ in range(N):
        A.append(tuple(map(int, input().split()))
	print(countTriangles(P, N))
	
# This code is contributed by Rituraj Jain
