(n,),*xy = [list(map(int, s.split())) for s in open(0)]

from collections import Counter
from itertools import combinations
from sys import exit

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

c = Counter()

for (xa,ya),(xb,yb) in combinations(xy,2):
    c[(xa-xb, ya-yb)] += 1
    c[(xb-xa, yb-ya)] += 1

print(n - max(c.values())) list(map(int, s.split())) for s in open(0) for s in open(0) s open(0) open 0 for s in open(0) list(map(int, s.split())) list map(int, s.split()) map int s.split() s.split s split (n,),*xy = [list(map(int, s.split())) for s in open(0)] n [list(map(int, s.split())) for s in open(0)] *xy xy from collections import Counter from itertools import combinations from sys import exit if n == 1:
    print(1)
    exit() n == 1 n 1 print(1) print 1 exit() exit c = Counter() c Counter() Counter for (xa,ya),(xb,yb) in combinations(xy,2):
    c[(xa-xb, ya-yb)] += 1
    c[(xb-xa, yb-ya)] += 1 (xa,ya) xa ya (xb,yb) xb yb combinations(xy,2) combinations xy 2 c[(xa-xb, ya-yb)] += 1 c[(xa-xb, ya-yb)] c (xa-xb, ya-yb) xa-xb xa xb ya-yb ya yb 1 c[(xb-xa, yb-ya)] += 1 c[(xb-xa, yb-ya)] c (xb-xa, yb-ya) xb-xa xb xa yb-ya yb ya 1 print(n - max(c.values())) print n - max(c.values()) n max(c.values()) max c.values() c.values c values n,),*xy = [list(map(int, s.split())) for s in open(0)] [list(map(int, s.split())) for s in open(0)] n c = Counter() Counter() c
(n,),*xy = [list(map(int, s.split())) for s in open(0)]

from collections import Counter
from itertools import combinations
from sys import exit

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

c = Counter()

for (xa,ya),(xb,yb) in combinations(xy,2):
    c[(xa-xb, ya-yb)] += 1
    c[(xb-xa, yb-ya)] += 1

print(n - max(c.values()))