from collections import Counter


N = int(input())
M = [tuple(map(int, input().split())) for _ in range(N)]
Map = []
if N == 1:
    print(1)
    exit()
for i in range(N):
    x1, y1 = M[i]
    for j in range(N):
        if i == j:
            continue
        x2, y2 = M[j]
        Map.append((x2 - x1, y2 - y1))
MapC = Counter(Map)
print(N - MapC.most_common(1)[0][1])


 from collections import Counter N = int(input()) N int(input()) int input() input tuple(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) tuple(map(int, input().split())) tuple map(int, input().split()) map int input().split() ().split () input split M = [tuple(map(int, input().split())) for _ in range(N)] M [tuple(map(int, input().split())) for _ in range(N)] Map = [] Map [] if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit for i in range(N):
    x1, y1 = M[i]
    for j in range(N):
        if i == j:
            continue
        x2, y2 = M[j]
        Map.append((x2 - x1, y2 - y1)) i range(N) range N x1, y1 = M[i] x1 M[i] M i y1 for j in range(N):
        if i == j:
            continue
        x2, y2 = M[j]
        Map.append((x2 - x1, y2 - y1)) j range(N) range N if i == j:
            continue
         i == j i j continue x2, y2 = M[j] x2 M[j] M j y2 Map.append((x2 - x1, y2 - y1)) Map.append Map append (x2 - x1, y2 - y1) x2 - x1 x2 x1 y2 - y1 y2 y1 MapC = Counter(Map) MapC Counter(Map) Counter Map print(N - MapC.most_common(1)[0][1]) print N - MapC.most_common(1)[0][1] N MapC.most_common(1)[0][1] [0] MapC.most_common(1) MapC.most_common MapC most_common 1 0 1 y2 = M[j] M[j] y2 N = int(input()) int(input()) N y1 = M[i] M[i] y1 x2, y2 = M[j] M[j] x2 MapC = Counter(Map) Counter(Map) MapC x1, y1 = M[i] M[i] x1 Map = [] [] Map M = [tuple(map(int, input().split())) for _ in range(N)] [tuple(map(int, input().split())) for _ in range(N)] M
from collections import Counter


N = int(input())
M = [tuple(map(int, input().split())) for _ in range(N)]
Map = []
if N == 1:
    print(1)
    exit()
for i in range(N):
    x1, y1 = M[i]
    for j in range(N):
        if i == j:
            continue
        x2, y2 = M[j]
        Map.append((x2 - x1, y2 - y1))
MapC = Counter(Map)
print(N - MapC.most_common(1)[0][1])



