import sys



n = int(eval(input()))

x = [0]*n ; y = [0]*n

for i in range(n):

    x[i],y[i] = list(map(int, input().split()))



if n == 1:

    print((1))

    sys.exit()



ans = []

for i in range(n):

    for j in range(n):

        if i == j:

            continue

        p = x[i]-x[j]

        q = y[i]-y[j]

        count = 0

        for k in range(n):

            for l in range(n):

                if p == x[k]-x[l] and q == y[k]-y[l]:

                    count += 1

                ans.append(count)



print((n-max(ans)))
from collections import Counter

import sys



n = int(eval(input()))

x = [0]*n ; y = [0]*n

for i in range(n):

    x[i],y[i] = list(map(int, input().split()))



if n == 1:

    print((1))

    sys.exit()



dc_c = []

dc_c = []

dc_ans = []

for i in range(n):

    ii = 0

    d = [[-1]*2 for i in range(n)]

    for j in range(n):

        if i != j:

            d[ii][0] = x[i]-x[j]

            d[ii][1] = y[i]-y[j]

            ii += 1

    dc = Counter(list(map(tuple, d)))

    dc_ans = Counter(dc_ans) + dc

dc_ans = dc_ans.most_common()

if dc_ans[0][0] == (-1, -1):

    print((n-dc_ans[1][1]))

else:

    print((n-dc_ans[0][1]))

import sys

n = int(eval(input()))
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = list(map(int, input().split()))
if n == 1:
    print((1))
    sys.exit()
ans = []
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        p = x[i] - x[j]
        q = y[i] - y[j]
        count = 0
        for k in range(n):
            for l in range(n):
                if p == x[k] - x[l] and q == y[k] - y[l]:
                    count += 1
                ans.append(count)
print((n - max(ans)))

from collections import Counter
import sys

n = int(eval(input()))
x = [0] * n
y = [0] * n
for i in range(n):
    x[i], y[i] = list(map(int, input().split()))
if n == 1:
    print((1))
    sys.exit()
dc_c = []
dc_c = []
dc_ans = []
for i in range(n):
    ii = 0
    d = [[-1] * 2 for i in range(n)]
    for j in range(n):
        if i != j:
            d[ii][0] = x[i] - x[j]
            d[ii][1] = y[i] - y[j]
            ii += 1
    dc = Counter(list(map(tuple, d)))
    dc_ans = Counter(dc_ans) + dc
dc_ans = dc_ans.most_common()
if dc_ans[0][0] == (-1, -1):
    print((n - dc_ans[1][1]))
else:
    print((n - dc_ans[0][1]))

+from collections import Counter -ans = [] +dc_c = [] +dc_c = [] +dc_ans = [] +    ii = 0 +    d = [[-1] * 2 for i in range(n)] -        if i == j: -            continue -        p = x[i] - x[j] -        q = y[i] - y[j] -        count = 0 -        for k in range(n): -            for l in range(n): -                if p == x[k] - x[l] and q == y[k] - y[l]: -                    count += 1 -                ans.append(count) -print((n - max(ans))) +        if i != j: +            d[ii][0] = x[i] - x[j] +            d[ii][1] = y[i] - y[j] +            ii += 1 +    dc = Counter(list(map(tuple, d))) +    dc_ans = Counter(dc_ans) + dc +dc_ans = dc_ans.most_common() +if dc_ans[0][0] == (-1, -1): +    print((n - dc_ans[1][1])) +else: +    print((n - dc_ans[0][1]))