from math import gcd
from collections import defaultdict
n = int(input())
d = defaultdict(int)
x = [0] * n
y = [0] * n
for i in range(n):
	x[i], y[i] = map(int,input().split())
	x[i] *= 2
	y[i] *= 2

def adjust(a, b):
	g = gcd(a, b)
	a //= g
	b //= g
	if a == 0 and b < 0: b = -b
	if b == 0 and a < 0: a = -a
	if a < 0:
		a = -a
		b = -b
	return (a, b)

for i in range(n):
	for j in range(i + 1, n):
		xt, yt = adjust(x[j] - x[i], y[j] - y[i])
		d[(
			(x[i] + x[j]) // 2,
			(y[i] + y[j]) // 2,
			xt,
			yt
		)] += 1

ans = 0
for t, c in d.items():
	xt, yt = adjust(-t[3], t[2])
	if (t[0], t[1], xt, yt) not in d:
		continue
	ans += d[(t[0], t[1], xt, yt)] * c

print(ans // 2)