from collections import *
(n,),*p=[[*map(int,i.split())] for i in open(0)]
d=defaultdict(int)
for x, y in p:
    for a, b in p:
        d[(x-a, y-b)]+=(x,y)!=(a,b)
print(n-max(d.values())) from collections import * [*map(int,i.split())] for i in open(0) for i in open(0) i open(0) open 0 for i in open(0) [*map(int,i.split())] *map(int,i.split()) map(int,i.split()) map int i.split() i.split i split (n,),*p=[[*map(int,i.split())] for i in open(0)] n [[*map(int,i.split())] for i in open(0)] *p p d=defaultdict(int) d defaultdict(int) defaultdict int for x, y in p:
    for a, b in p:
        d[(x-a, y-b)]+=(x,y)!=(a,b) x y p for a, b in p:
        d[(x-a, y-b)]+=(x,y)!=(a,b) a b p d[(x-a, y-b)]+=(x,y)!=(a,b) d[(x-a, y-b)] d (x-a, y-b) x-a x a y-b y b (x,y)!=(a,b) (x,y) x y (a,b) a b print(n-max(d.values())) print n-max(d.values()) n max(d.values()) max d.values() d.values d values d=defaultdict(int) defaultdict(int) d n,),*p=[[*map(int,i.split())] for i in open(0)] [[*map(int,i.split())] for i in open(0)] n
from collections import *
(n,),*p=[[*map(int,i.split())] for i in open(0)]
d=defaultdict(int)
for x, y in p:
    for a, b in p:
        d[(x-a, y-b)]+=(x,y)!=(a,b)
print(n-max(d.values()))
