n = int(eval(input()))

xy = [list(map(int, input().split())) for _ in range(n)]

xy.sort()

vectors = set()

for i in range(n-1):

    for j in range(i+1, n):

        xi, yi = xy[i]

        xj, yj = xy[j]

        if xj-xi == 0 and yj-yi == 0:

            continue

        unit_vector = (xj-xi, yj-yi)

        vectors |= {unit_vector}

ans = n

for vector in vectors:

    cnt = 0

    for i in range(n-1):

        for j in range(i+1, n):

            xi, yi = xy[i]

            xj, yj = xy[j]

            if vector == (xj-xi, yj-yi):

                cnt += 1

    ans = min(ans, n-cnt)

print(ans)

import itertools

from collections import defaultdict

n = int(eval(input()))

xy = [list(map(int, input().split())) for _ in range(n)]

dd = defaultdict(int)

for xy1, xy2 in itertools.combinations(xy, 2):

    x1, y1 = xy1

    x2, y2 = xy2

    unit_vect = (x1-x2, y1-y2)

    dd[unit_vect] += 1

    unit_vect = (x2-x1, y2-y1)

    dd[unit_vect] += 1



if n == 1:

    ans = 1

else:

    ans = n-max(dd.values())

print(ans)
n = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(n)]
xy.sort()
vectors = set()
for i in range(n - 1):
    for j in range(i + 1, n):
        xi, yi = xy[i]
        xj, yj = xy[j]
        if xj - xi == 0 and yj - yi == 0:
            continue
        unit_vector = (xj - xi, yj - yi)
        vectors |= {unit_vector}
ans = n
for vector in vectors:
    cnt = 0
    for i in range(n - 1):
        for j in range(i + 1, n):
            xi, yi = xy[i]
            xj, yj = xy[j]
            if vector == (xj - xi, yj - yi):
                cnt += 1
    ans = min(ans, n - cnt)
print(ans)

import itertools
from collections import defaultdict

n = int(eval(input()))
xy = [list(map(int, input().split())) for _ in range(n)]
dd = defaultdict(int)
for xy1, xy2 in itertools.combinations(xy, 2):
    x1, y1 = xy1
    x2, y2 = xy2
    unit_vect = (x1 - x2, y1 - y2)
    dd[unit_vect] += 1
    unit_vect = (x2 - x1, y2 - y1)
    dd[unit_vect] += 1
if n == 1:
    ans = 1
else:
    ans = n - max(dd.values())
print(ans)

+import itertools +from collections import defaultdict + -xy.sort() -vectors = set() -for i in range(n - 1): -    for j in range(i + 1, n): -        xi, yi = xy[i] -        xj, yj = xy[j] -        if xj - xi == 0 and yj - yi == 0: -            continue -        unit_vector = (xj - xi, yj - yi) -        vectors |= {unit_vector} -ans = n -for vector in vectors: -    cnt = 0 -    for i in range(n - 1): -        for j in range(i + 1, n): -            xi, yi = xy[i] -            xj, yj = xy[j] -            if vector == (xj - xi, yj - yi): -                cnt += 1 -    ans = min(ans, n - cnt) +dd = defaultdict(int) +for xy1, xy2 in itertools.combinations(xy, 2): +    x1, y1 = xy1 +    x2, y2 = xy2 +    unit_vect = (x1 - x2, y1 - y2) +    dd[unit_vect] += 1 +    unit_vect = (x2 - x1, y2 - y1) +    dd[unit_vect] += 1 +if n == 1: +    ans = 1 +else: +    ans = n - max(dd.values())