from collections import defaultdict from itertools import combinations from math import gcd N = int(input()) X, Y = map(list, zip(*[map(int, input().split()) for _ in range(N)])) def compress(dx, dy): if dx == 0: return (0, 1) if dy == 0: return (1, 0) if dx < 0: dx, dy = -dx, -dy g = abs(gcd(dx, dy)) return (dx // g, dy // g) d = defaultdict(int) for a, b in combinations(zip(X, Y), 2): x1, y1 = a x2, y2 = b d[(x1 + x2, y1 + y2, compress(x1 - x2, y1 - y2))] += 1 ans = 0 for a, b in combinations(zip(X, Y), 2): x1, y1 = a x2, y2 = b ans += d[(x1 + x2, y1 + y2, compress(y2 - y1, x1 - x2))] print(ans // 2)