import sys
import numpy as np

n = int(input())
image = np.zeros([2001, 2001])
stars = []
used_vectors = set()

for i in range(n):
    x, y = input().split(" ")
    x, y = int(x), int(y)
    stars.append((x, y))
    image[x + 1000][y + 1000] = 1

counter2 = 0
for i in range(1, len(stars)):
    counter = 0
    dx, dy = stars[i][0] - stars[0][0], stars[i][1] - stars[0][1]
    if (-dx, -dy) in used_vectors:
        continue
    for j in range(len(stars)):
        a = stars[j][0] + dx + 1000
        b = stars[j][1] + dy + 1000
        if a < 2001 and a >= 0 and b < 2001 and b >= 0 and image[a][b] == 1:
            counter += 1
    if counter >= len(stars) / 2:
        counter2 += 2
    used_vectors.add((dx, dy))

print(counter2)
