import sys

n = int(input())
stars = []
for line in sys.stdin:
    x, y = map(int, line.split())
    stars.append((x,y))

first = stars[0]
stars = set(stars)

def difff(a, b):
    return (a[0]- b[0], a[1] - b[1])
res = 0
for star in stars:
    if star == first:
        continue
    vectors = [difff(first, star), difff(star, first)]
    for star in stars:
        if difff(star, vectors[0]) not in stars and difff(star, vectors[1]) not in stars:
            break
    else:
        res+=2
print(res)

