from itertools import combinations

from collections import Counter



N = int(eval(input()))

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



if N == 1:

    print((1))

    quit()



X.sort()

diff = []

for i, j in combinations(list(range(N)), 2):

    diff.append((X[i][0] - X[j][0], X[i][1] - X[j][1]))

print((N - Counter(diff).most_common()[0][1]))







from collections import defaultdict



N = int(eval(input()))

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



X.sort()

ctr = defaultdict(int)

for i in range(N - 1):

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

        p = X[i][0] - X[j][0]

        q = X[i][1] - X[j][1]

        ctr[(p, q)] += 1

        ctr[(-p, -q)] += 1



if N == 1:

    print((1))

else:

    print((N - max(ctr.values())))

from itertools import combinations
from collections import Counter

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
if N == 1:
    print((1))
    quit()
X.sort()
diff = []
for i, j in combinations(list(range(N)), 2):
    diff.append((X[i][0] - X[j][0], X[i][1] - X[j][1]))
print((N - Counter(diff).most_common()[0][1]))

from collections import defaultdict

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
X.sort()
ctr = defaultdict(int)
for i in range(N - 1):
    for j in range(i + 1, N):
        p = X[i][0] - X[j][0]
        q = X[i][1] - X[j][1]
        ctr[(p, q)] += 1
        ctr[(-p, -q)] += 1
if N == 1:
    print((1))
else:
    print((N - max(ctr.values())))

-from itertools import combinations -from collections import Counter +from collections import defaultdict +X.sort() +ctr = defaultdict(int) +for i in range(N - 1): +    for j in range(i + 1, N): +        p = X[i][0] - X[j][0] +        q = X[i][1] - X[j][1] +        ctr[(p, q)] += 1 +        ctr[(-p, -q)] += 1 -    quit() -X.sort() -diff = [] -for i, j in combinations(list(range(N)), 2): -    diff.append((X[i][0] - X[j][0], X[i][1] - X[j][1])) -print((N - Counter(diff).most_common()[0][1])) +else: +    print((N - max(ctr.values())))