N = int(eval(input()))

X = []

for i in range(N):

    xi,yi = list(map(int,input().split()))

    X.append([xi,yi])



L = []

d = {}

for i in range(N):

    for j in range(N):

        if i == j:

            continue

    

        x,y = X[i][0]-X[j][0],X[i][1]-X[j][1]

        #L.append([x,y])

        if not x in d:

            d[x] = {}

        if not y in d[x]:

            d[x][y] = 1

        else:

            d[x][y] += 1

m = 0

for k in list(d.keys()):

    for kk in list(d[k].keys()):

        m = max(m,d[k][kk])

print((N-m))

from collections import Counter

N = int(eval(input()))

if N == 1:

    print((1))

else:

    X = []

    for i in range(N):

        xi,yi = list(map(int,input().split()))

        X.append((xi,yi))

    L = []

    for i in range(N):

        for j in range(N):

            if i == j:

                continue

            x,y = X[i][0]-X[j][0],X[i][1]-X[j][1]

            L.append((x,y))

    m = Counter(L).most_common()[0][1]

    print((N-m))

N = int(eval(input()))
X = []
for i in range(N):
    xi, yi = list(map(int, input().split()))
    X.append([xi, yi])
L = []
d = {}
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        x, y = X[i][0] - X[j][0], X[i][1] - X[j][1]
        # L.append([x,y])
        if not x in d:
            d[x] = {}
        if not y in d[x]:
            d[x][y] = 1
        else:
            d[x][y] += 1
m = 0
for k in list(d.keys()):
    for kk in list(d[k].keys()):
        m = max(m, d[k][kk])
print((N - m))

from collections import Counter

N = int(eval(input()))
if N == 1:
    print((1))
else:
    X = []
    for i in range(N):
        xi, yi = list(map(int, input().split()))
        X.append((xi, yi))
    L = []
    for i in range(N):
        for j in range(N):
            if i == j:
                continue
            x, y = X[i][0] - X[j][0], X[i][1] - X[j][1]
            L.append((x, y))
    m = Counter(L).most_common()[0][1]
    print((N - m))

+from collections import Counter + -X = [] -for i in range(N): -    xi, yi = list(map(int, input().split())) -    X.append([xi, yi]) -L = [] -d = {} -for i in range(N): -    for j in range(N): -        if i == j: -            continue -        x, y = X[i][0] - X[j][0], X[i][1] - X[j][1] -        # L.append([x,y]) -        if not x in d: -            d[x] = {} -        if not y in d[x]: -            d[x][y] = 1 -        else: -            d[x][y] += 1 -m = 0 -for k in list(d.keys()): -    for kk in list(d[k].keys()): -        m = max(m, d[k][kk]) -print((N - m)) +if N == 1: +    print((1)) +else: +    X = [] +    for i in range(N): +        xi, yi = list(map(int, input().split())) +        X.append((xi, yi)) +    L = [] +    for i in range(N): +        for j in range(N): +            if i == j: +                continue +            x, y = X[i][0] - X[j][0], X[i][1] - X[j][1] +            L.append((x, y)) +    m = Counter(L).most_common()[0][1] +    print((N - m))