from collections import Counter

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

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

xy.sort(key=lambda x: x[1])
xy.sort(key=lambda x: x[0])

ans = N
diff = []

for i in range(N-1):
    for j in range(i+1, N):
        diff.append((xy[j][0]-xy[i][0], xy[j][1]-xy[i][1]))

c = Counter(diff)
print(N - c.most_common()[0][1]) from collections import Counter N = int(input()) N int(input()) int input() input list(map(int, input().split())) for _ in range(N) for _ in range(N) _ range(N) range N for _ in range(N) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split xy = [list(map(int, input().split())) for _ in range(N)] xy [list(map(int, input().split())) for _ in range(N)] if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit xy.sort(key=lambda x: x[1]) xy.sort xy sort key=lambda x: x[1] key lambda x: x[1] x[1] x 1 x xy.sort(key=lambda x: x[0]) xy.sort xy sort key=lambda x: x[0] key lambda x: x[0] x[0] x 0 x ans = N ans N diff = [] diff [] for i in range(N-1):
    for j in range(i+1, N):
        diff.append((xy[j][0]-xy[i][0], xy[j][1]-xy[i][1])) i range(N-1) range N-1 N 1 for j in range(i+1, N):
        diff.append((xy[j][0]-xy[i][0], xy[j][1]-xy[i][1])) j range(i+1, N) range i+1 i 1 N diff.append((xy[j][0]-xy[i][0], xy[j][1]-xy[i][1])) diff.append diff append (xy[j][0]-xy[i][0], xy[j][1]-xy[i][1]) xy[j][0]-xy[i][0] xy[j][0] [j] xy j 0 xy[i][0] [i] xy i 0 xy[j][1]-xy[i][1] xy[j][1] [j] xy j 1 xy[i][1] [i] xy i 1 c = Counter(diff) c Counter(diff) Counter diff print(N - c.most_common()[0][1]) print N - c.most_common()[0][1] N c.most_common()[0][1] [0] c.most_common() c.most_common c most_common 0 1 xy = [list(map(int, input().split())) for _ in range(N)] [list(map(int, input().split())) for _ in range(N)] xy c = Counter(diff) Counter(diff) c ans = N N ans diff = [] [] diff N = int(input()) int(input()) N
from collections import Counter

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

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

xy.sort(key=lambda x: x[1])
xy.sort(key=lambda x: x[0])

ans = N
diff = []

for i in range(N-1):
    for j in range(i+1, N):
        diff.append((xy[j][0]-xy[i][0], xy[j][1]-xy[i][1]))

c = Counter(diff)
print(N - c.most_common()[0][1])