from collections import defaultdict
N = int(input())
if N == 1:
    print(1)
    exit()
X, Y = [], []
for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)
d = defaultdict(int)
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        p = X[i] - X[j]
        q = Y[i] - Y[j]
        d[(p, q)] += 1
print(N - max(d.values())) from collections import defaultdict N = int(input()) N int(input()) int input() input if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit X, Y = [], [] X [] Y [] for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y) _ range(N) range N x, y = map(int, input().split()) x map(int, input().split()) map int input().split() ().split () input split y X.append(x) X.append X append x Y.append(y) Y.append Y append y d = defaultdict(int) d defaultdict(int) defaultdict int for i in range(N):
    for j in range(N):
        if i == j:
            continue
        p = X[i] - X[j]
        q = Y[i] - Y[j]
        d[(p, q)] += 1 i range(N) range N for j in range(N):
        if i == j:
            continue
        p = X[i] - X[j]
        q = Y[i] - Y[j]
        d[(p, q)] += 1 j range(N) range N if i == j:
            continue
         i == j i j continue p = X[i] - X[j] p X[i] - X[j] X[i] X i X[j] X j q = Y[i] - Y[j] q Y[i] - Y[j] Y[i] Y i Y[j] Y j d[(p, q)] += 1 d[(p, q)] d (p, q) p q 1 print(N - max(d.values())) print N - max(d.values()) N max(d.values()) max d.values() d.values d values X, Y = [], [] [] X d = defaultdict(int) defaultdict(int) d Y = [], [] [] Y p = X[i] - X[j] X[i] - X[j] p x, y = map(int, input().split()) map(int, input().split()) x y = map(int, input().split()) map(int, input().split()) y N = int(input()) int(input()) N q = Y[i] - Y[j] Y[i] - Y[j] q
from collections import defaultdict
N = int(input())
if N == 1:
    print(1)
    exit()
X, Y = [], []
for _ in range(N):
    x, y = map(int, input().split())
    X.append(x)
    Y.append(y)
d = defaultdict(int)
for i in range(N):
    for j in range(N):
        if i == j:
            continue
        p = X[i] - X[j]
        q = Y[i] - Y[j]
        d[(p, q)] += 1
print(N - max(d.values()))