from collections import Counter, deque, defaultdict

from operator import itemgetter, xor, mul



import sys

#input = sys.stdin.readline

from sys import setrecursionlimit

setrecursionlimit(10**9)



def inpl(): return list(map(int, input().split()))

g0 = itemgetter(0)

N = int(eval(input()))

X, Y = [0]*N, [0]*N

P = []

for i in range(N):

    P.append(inpl())

P = sorted(P)

for i in range(N):

    X[i], Y[i] = P[i]



U = [(X[i]-X[j], Y[i] - Y[j])for i in range(N) for j in range(N) if i != j]

D = defaultdict(int)

for i in range(N):

    D[(X[i], Y[i])] = i+1



ans = N

for ux, uy in U:

    if ux < 0:

        continue

    tmp = 0

    searched = [0]*(N)

    for i in range(N):

        if not searched[i]:

            tmp += 1

            searched[i] = 1

        j = D[(X[i]+ux), (Y[i]+uy)]

        if j:

            searched[j-1] = 1

    ans = min(tmp, ans)

print(ans)

from collections import defaultdict

def inpl(): return list(map(int, input().split()))



N = int(eval(input()))

XY = sorted([inpl() for _ in range(N)])

D = defaultdict(int)

for i in range(N):

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

        D[(XY[j][0] - XY[i][0]), (XY[j][1] - XY[i][1])] += 1



print((N - max(D.values()) if N > 1 else 1))
from collections import Counter, deque, defaultdict
from operator import itemgetter, xor, mul
import sys

# input = sys.stdin.readline
from sys import setrecursionlimit

setrecursionlimit(10**9)


def inpl():
    return list(map(int, input().split()))


g0 = itemgetter(0)
N = int(eval(input()))
X, Y = [0] * N, [0] * N
P = []
for i in range(N):
    P.append(inpl())
P = sorted(P)
for i in range(N):
    X[i], Y[i] = P[i]
U = [(X[i] - X[j], Y[i] - Y[j]) for i in range(N) for j in range(N) if i != j]
D = defaultdict(int)
for i in range(N):
    D[(X[i], Y[i])] = i + 1
ans = N
for ux, uy in U:
    if ux < 0:
        continue
    tmp = 0
    searched = [0] * (N)
    for i in range(N):
        if not searched[i]:
            tmp += 1
            searched[i] = 1
        j = D[(X[i] + ux), (Y[i] + uy)]
        if j:
            searched[j - 1] = 1
    ans = min(tmp, ans)
print(ans)

from collections import defaultdict


def inpl():
    return list(map(int, input().split()))


N = int(eval(input()))
XY = sorted([inpl() for _ in range(N)])
D = defaultdict(int)
for i in range(N):
    for j in range(i + 1, N):
        D[(XY[j][0] - XY[i][0]), (XY[j][1] - XY[i][1])] += 1
print((N - max(D.values()) if N > 1 else 1))

-from collections import Counter, deque, defaultdict -from operator import itemgetter, xor, mul -import sys - -# input = sys.stdin.readline -from sys import setrecursionlimit - -setrecursionlimit(10**9) +from collections import defaultdict -g0 = itemgetter(0) -X, Y = [0] * N, [0] * N -P = [] -for i in range(N): -    P.append(inpl()) -P = sorted(P) -for i in range(N): -    X[i], Y[i] = P[i] -U = [(X[i] - X[j], Y[i] - Y[j]) for i in range(N) for j in range(N) if i != j] +XY = sorted([inpl() for _ in range(N)]) -    D[(X[i], Y[i])] = i + 1 -ans = N -for ux, uy in U: -    if ux < 0: -        continue -    tmp = 0 -    searched = [0] * (N) -    for i in range(N): -        if not searched[i]: -            tmp += 1 -            searched[i] = 1 -        j = D[(X[i] + ux), (Y[i] + uy)] -        if j: -            searched[j - 1] = 1 -    ans = min(tmp, ans) -print(ans) +    for j in range(i + 1, N): +        D[(XY[j][0] - XY[i][0]), (XY[j][1] - XY[i][1])] += 1 +print((N - max(D.values()) if N > 1 else 1))