N = int(input()) point = [] for _ in range(N): x,y = map(int,input().split()) point.append((x,y)) def gcd(a,b): if b == 0:return a r = a % b a = b b = r return gcd(a,b) from collections import defaultdict d1 = defaultdict(int) d2 = defaultdict(int) ans = 0 for i in range(N): x,y = point[i] for j in range(i + 1,N): xx,yy = point[j] if xx == x: u = (0,1) elif yy == y: u = (1,0) elif xx > x: a = xx - x b = yy - y t = gcd(a,b if b > 0 else -b) u = (a // t,b // t) else: a = x - xx b = y - yy t = gcd(a,b if b > 0 else -b) u = (a // t,b // t) v = (x + xx,y + yy) """ ans += d1[v] ans -= d2[(v,u)] d1[v] += 1 d2[(v,u)] += 1 """ m,mm = u uu = (-mm,m) uuu = (mm,-m) ans += d2[(v,uu)] ans += d2[(v,uuu)] d2[(v,u)] += 1 print(ans) #print(d1,d2)