from decimal import Decimal from collections import defaultdict from bisect import bisect_left, bisect_right N = int(input()) XY = [list(map(int, input().split())) for _ in range(N)] def vec(a, b): return (b[0]-a[0], b[1]-a[1]) D1 = defaultdict(list) D2 = defaultdict(list) for i in range(N-1): X1, Y1 = XY[i] for j in range(i+1, N): X2, Y2 = XY[j] if Y1 == Y2: center = (Decimal(X1)+Decimal(X2))/2 D1[(center, Y1)].append(0) else: x1, y1, x2, y2 = X1, Y1, X2, Y2 if y2 < y1: x1, y1, x2, y2 = x2, y2, x1, y1 if x1 == x2: center = (Decimal(y1)+Decimal(y2))/2 D2[(x1, center)].append(0) else: cX = (Decimal(x1)+Decimal(x2))/2 cY = (Decimal(y1)+Decimal(y2))/2 if x1 < x2: vX, vY = vec((x1, y1), (x2, y2)) V = Decimal(vX)/Decimal(vY) D1[(cX, cY)].append(V) else: vX, vY = vec((y1, -x1), (y2, -x2)) V = Decimal(vX)/Decimal(vY) D2[(cX, cY)].append(V) for k in D2.keys(): D2[k].sort() ans = 0 for k in D1.keys(): if k in D2: for i in D1[k]: ans += bisect_right(D2[k], i)-bisect_left(D2[k], i) print(ans)