import sys
from itertools import combinations
from collections import Counter
read = sys.stdin.read

N, *xy = map(int, read().split())

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

pq = []
for (a1, b1), (a2, b2) in combinations(zip(*[iter(xy)] * 2), 2):
    p = a1 - a2
    q = b1 - b2
    pq.append((p, q))
    pq.append((-p, -q))

print(N - Counter(pq).most_common()[0][1]) import sys sys from itertools import combinations from collections import Counter read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read N, *xy = map(int, read().split()) N map(int, read().split()) map int read().split() ().split () read split *xy xy if N == 1:
    print(1)
    exit() N == 1 N 1 print(1) print 1 exit() exit pq = [] pq [] for (a1, b1), (a2, b2) in combinations(zip(*[iter(xy)] * 2), 2):
    p = a1 - a2
    q = b1 - b2
    pq.append((p, q))
    pq.append((-p, -q)) (a1, b1) a1 b1 (a2, b2) a2 b2 combinations(zip(*[iter(xy)] * 2), 2) combinations zip(*[iter(xy)] * 2) zip *[iter(xy)] * 2 [iter(xy)] * 2 [iter(xy)] iter(xy) iter xy 2 2 p = a1 - a2 p a1 - a2 a1 a2 q = b1 - b2 q b1 - b2 b1 b2 pq.append((p, q)) pq.append pq append (p, q) p q pq.append((-p, -q)) pq.append pq append (-p, -q) -p p -q q print(N - Counter(pq).most_common()[0][1]) print N - Counter(pq).most_common()[0][1] N Counter(pq).most_common()[0][1] [0] (pq).most_common() (pq).most_common (pq) Counter pq most_common 0 1 p = a1 - a2 a1 - a2 p read = sys.stdin.read sys.stdin.read read q = b1 - b2 b1 - b2 q pq = [] [] pq N, *xy = map(int, read().split()) map(int, read().split()) N
import sys
from itertools import combinations
from collections import Counter
read = sys.stdin.read

N, *xy = map(int, read().split())

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

pq = []
for (a1, b1), (a2, b2) in combinations(zip(*[iter(xy)] * 2), 2):
    p = a1 - a2
    q = b1 - b2
    pq.append((p, q))
    pq.append((-p, -q))

print(N - Counter(pq).most_common()[0][1])