import collections

N = int(input())

if N == 1:
    print(1)
    exit()

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

x_y.sort(key=lambda x: (x[0], x[1]))
pq_cand = []
for i in range(N):
    for j in range(i + 1, N):
        pq_cand.append((x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1]))

pqc = collections.Counter(pq_cand)
_, x = max(pqc.items(), key=lambda x: x[1])
print(N - 1 - x + 1) import collections collections 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.append(list(map(int, input().split()))) _ range(N) range N x_y.append(list(map(int, input().split()))) x_y.append x_y append list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split x_y.sort(key=lambda x: (x[0], x[1])) x_y.sort x_y sort key=lambda x: (x[0], x[1]) key lambda x: (x[0], x[1]) (x[0], x[1]) x[0] x 0 x[1] x 1 x pq_cand = [] pq_cand [] for i in range(N):
    for j in range(i + 1, N):
        pq_cand.append((x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1])) i range(N) range N for j in range(i + 1, N):
        pq_cand.append((x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1])) j range(i + 1, N) range i + 1 i 1 N pq_cand.append((x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1])) pq_cand.append pq_cand append (x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1]) x_y[j][0] - x_y[i][0] x_y[j][0] [j] x_y j 0 x_y[i][0] [i] x_y i 0 x_y[j][1] - x_y[i][1] x_y[j][1] [j] x_y j 1 x_y[i][1] [i] x_y i 1 pqc = collections.Counter(pq_cand) pqc collections.Counter(pq_cand) collections.Counter collections Counter pq_cand _, x = max(pqc.items(), key=lambda x: x[1]) _ max(pqc.items(), key=lambda x: x[1]) max pqc.items() pqc.items pqc items key=lambda x: x[1] key lambda x: x[1] x[1] x 1 x x print(N - 1 - x + 1) print N - 1 - x + 1 N - 1 - x N - 1 N 1 x 1 pqc = collections.Counter(pq_cand) collections.Counter(pq_cand) pqc _, x = max(pqc.items(), key=lambda x: x[1]) max(pqc.items(), key=lambda x: x[1]) _ pq_cand = [] [] pq_cand N = int(input()) int(input()) N x = max(pqc.items(), key=lambda x: x[1]) max(pqc.items(), key=lambda x: x[1]) x x_y = [] [] x_y
import collections

N = int(input())

if N == 1:
    print(1)
    exit()

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

x_y.sort(key=lambda x: (x[0], x[1]))
pq_cand = []
for i in range(N):
    for j in range(i + 1, N):
        pq_cand.append((x_y[j][0] - x_y[i][0], x_y[j][1] - x_y[i][1]))

pqc = collections.Counter(pq_cand)
_, x = max(pqc.items(), key=lambda x: x[1])
print(N - 1 - x + 1)
