import sys input = sys.stdin.readline # def input(): return sys.stdin.readline().rstrip() # 文字列 def dist(x, y): one = x[0] - y[0] two = x[1] - y[1] return one * one + two * two n = int(input()) p = [tuple(map(int, input().split())) for i in range(n)] d = [] for i in range(n - 1): for j in range(i + 1, n): d.append((dist(p[i], p[j]), i, j)) d.sort(key=lambda x: x[0]) s = set(range(n)) ans = 0 i = 0 while len(s) > 1: _, x, y = d[i] if x == 0 or y == 0: if x + y in s: s.remove(x + y) ans += 1 elif x in s and y in s: s.remove(x) s.remove(y) i += 1 print(ans)