N = int(eval(input()))

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



ans = N

for i in range(N):

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

        p, q = balls[j][0]-balls[i][0], balls[j][1]-balls[i][1]

        cost = N

        for a in range(N):

            x1, y1 = balls[a]

            for b in range(N):

                x2, y2 = balls[b]

                if (x2-x1, y2-y1) == (p, q):

                    cost -= 1

                    break

        ans = min(ans, cost)



print(ans)

from collections import Counter



N = int(eval(input()))

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



if N == 1:

    ans = 1

else:

    diffs = Counter()

    for i in range(N):

        x1, y1 = balls[i]

        for j in range(N):

            if i == j: continue

            x2, y2 = balls[j]

            diffs.update([(x2-x1, y2-y1)])

    ans = N - diffs.most_common(1)[0][1]



print(ans)

N = int(eval(input()))
balls = [tuple(map(int, input().split())) for _ in range(N)]
ans = N
for i in range(N):
    for j in range(i + 1, N):
        p, q = balls[j][0] - balls[i][0], balls[j][1] - balls[i][1]
        cost = N
        for a in range(N):
            x1, y1 = balls[a]
            for b in range(N):
                x2, y2 = balls[b]
                if (x2 - x1, y2 - y1) == (p, q):
                    cost -= 1
                    break
        ans = min(ans, cost)
print(ans)

from collections import Counter

N = int(eval(input()))
balls = [tuple(map(int, input().split())) for _ in range(N)]
if N == 1:
    ans = 1
else:
    diffs = Counter()
    for i in range(N):
        x1, y1 = balls[i]
        for j in range(N):
            if i == j:
                continue
            x2, y2 = balls[j]
            diffs.update([(x2 - x1, y2 - y1)])
    ans = N - diffs.most_common(1)[0][1]
print(ans)

+from collections import Counter + -ans = N -for i in range(N): -    for j in range(i + 1, N): -        p, q = balls[j][0] - balls[i][0], balls[j][1] - balls[i][1] -        cost = N -        for a in range(N): -            x1, y1 = balls[a] -            for b in range(N): -                x2, y2 = balls[b] -                if (x2 - x1, y2 - y1) == (p, q): -                    cost -= 1 -                    break -        ans = min(ans, cost) +if N == 1: +    ans = 1 +else: +    diffs = Counter() +    for i in range(N): +        x1, y1 = balls[i] +        for j in range(N): +            if i == j: +                continue +            x2, y2 = balls[j] +            diffs.update([(x2 - x1, y2 - y1)]) +    ans = N - diffs.most_common(1)[0][1]