import itertools

N = int(eval(input()))

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

if N==1:

    cmin = 1

else:

    cmin = 100

    for y in itertools.combinations(X,2):

        x1,y1 = y[0]

        x2,y2 = y[1]

        p = x2-x1

        q = y2-y1

        cnt0 = 0

        cnt1 = 0

        for i in range(N):

            x,y = X[i]

            if [x+p,y+q] in X:

                cnt0 += 1

            if [x-p,y-q] in X:

                cnt1 += 1

        cnt = max(cnt0,cnt1)

        cmin = min(cmin,N-cnt)

print(cmin)           

    
from itertools import combinations

N = int(eval(input()))

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

if N==1:

    print((1))

else:

    C = {}

    for z in combinations(X,2):

        x1,x2 = z

        a = x1[0]-x2[0]

        b = x1[1]-x2[1]

        if a>=0 and b>=0:

            if (a,b) not in C:

                C[(a,b)] = 0

            C[(a,b)] += 1

        elif a>0 and b<0:

            if (a,b) not in C:

                C[(a,b)] = 0

            C[(a,b)] += 1

        elif a==0 and b<0:

            if (a,-b) not in C:

                C[(a,-b)] = 0

            C[(a,-b)] += 1

        elif a<0 and b>0:

            if (-a,-b) not in C:

                C[(-a,-b)] = 0

            C[(-a,-b)] += 1

        elif a<0 and b==0:

            if (-a,b) not in C:

                C[(-a,b)] = 0

            C[(-a,b)] += 1

        elif a<0 and b<0:

            if (-a,-b) not in C:

                C[(-a,-b)] = 0

            C[(-a,-b)] += 1

    C = sorted(list(C.items()),key=lambda x:x[1],reverse=True)

    k = C[0][1]

    print((N-k))
import itertools

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
if N == 1:
    cmin = 1
else:
    cmin = 100
    for y in itertools.combinations(X, 2):
        x1, y1 = y[0]
        x2, y2 = y[1]
        p = x2 - x1
        q = y2 - y1
        cnt0 = 0
        cnt1 = 0
        for i in range(N):
            x, y = X[i]
            if [x + p, y + q] in X:
                cnt0 += 1
            if [x - p, y - q] in X:
                cnt1 += 1
        cnt = max(cnt0, cnt1)
        cmin = min(cmin, N - cnt)
print(cmin)

from itertools import combinations

N = int(eval(input()))
X = [list(map(int, input().split())) for _ in range(N)]
if N == 1:
    print((1))
else:
    C = {}
    for z in combinations(X, 2):
        x1, x2 = z
        a = x1[0] - x2[0]
        b = x1[1] - x2[1]
        if a >= 0 and b >= 0:
            if (a, b) not in C:
                C[(a, b)] = 0
            C[(a, b)] += 1
        elif a > 0 and b < 0:
            if (a, b) not in C:
                C[(a, b)] = 0
            C[(a, b)] += 1
        elif a == 0 and b < 0:
            if (a, -b) not in C:
                C[(a, -b)] = 0
            C[(a, -b)] += 1
        elif a < 0 and b > 0:
            if (-a, -b) not in C:
                C[(-a, -b)] = 0
            C[(-a, -b)] += 1
        elif a < 0 and b == 0:
            if (-a, b) not in C:
                C[(-a, b)] = 0
            C[(-a, b)] += 1
        elif a < 0 and b < 0:
            if (-a, -b) not in C:
                C[(-a, -b)] = 0
            C[(-a, -b)] += 1
    C = sorted(list(C.items()), key=lambda x: x[1], reverse=True)
    k = C[0][1]
    print((N - k))

-import itertools +from itertools import combinations -    cmin = 1 +    print((1)) -    cmin = 100 -    for y in itertools.combinations(X, 2): -        x1, y1 = y[0] -        x2, y2 = y[1] -        p = x2 - x1 -        q = y2 - y1 -        cnt0 = 0 -        cnt1 = 0 -        for i in range(N): -            x, y = X[i] -            if [x + p, y + q] in X: -                cnt0 += 1 -            if [x - p, y - q] in X: -                cnt1 += 1 -        cnt = max(cnt0, cnt1) -        cmin = min(cmin, N - cnt) -print(cmin) +    C = {} +    for z in combinations(X, 2): +        x1, x2 = z +        a = x1[0] - x2[0] +        b = x1[1] - x2[1] +        if a >= 0 and b >= 0: +            if (a, b) not in C: +                C[(a, b)] = 0 +            C[(a, b)] += 1 +        elif a > 0 and b < 0: +            if (a, b) not in C: +                C[(a, b)] = 0 +            C[(a, b)] += 1 +        elif a == 0 and b < 0: +            if (a, -b) not in C: +                C[(a, -b)] = 0 +            C[(a, -b)] += 1 +        elif a < 0 and b > 0: +            if (-a, -b) not in C: +                C[(-a, -b)] = 0 +            C[(-a, -b)] += 1 +        elif a < 0 and b == 0: +            if (-a, b) not in C: +                C[(-a, b)] = 0 +            C[(-a, b)] += 1 +        elif a < 0 and b < 0: +            if (-a, -b) not in C: +                C[(-a, -b)] = 0 +            C[(-a, -b)] += 1 +    C = sorted(list(C.items()), key=lambda x: x[1], reverse=True) +    k = C[0][1] +    print((N - k))