n=int(input())
dots=[]
for i in range(n):
    x,y=map(int,input().split())
    dots.append((x,y))
dots=sorted(sorted(dots, key=lambda x:x[1]))
#print(dots)
from itertools import combinations

combs=combinations(dots,r=2)
tmp=0
for c in combs:
    c=sorted(c)
    dx=c[1][0]-c[0][0]
    dy=c[1][1]-c[0][1]
    cnt=0
    for i in range(n):
        subdot=(dots[i][0]+dx,dots[i][1]+dy)
        if subdot in dots:
            cnt+=1
    tmp=max(tmp,cnt)
print(n-tmp) n=int(input()) n int(input()) int input() input dots=[] dots [] for i in range(n):
    x,y=map(int,input().split())
    dots.append((x,y)) i range(n) range n x,y=map(int,input().split()) x map(int,input().split()) map int input().split() ().split () input split y dots.append((x,y)) dots.append dots append (x,y) x y dots=sorted(sorted(dots, key=lambda x:x[1])) dots sorted(sorted(dots, key=lambda x:x[1])) sorted sorted(dots, key=lambda x:x[1]) sorted dots key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x from itertools import combinations combs=combinations(dots,r=2) combs combinations(dots,r=2) combinations dots r=2 r 2 tmp=0 tmp 0 for c in combs:
    c=sorted(c)
    dx=c[1][0]-c[0][0]
    dy=c[1][1]-c[0][1]
    cnt=0
    for i in range(n):
        subdot=(dots[i][0]+dx,dots[i][1]+dy)
        if subdot in dots:
            cnt+=1
    tmp=max(tmp,cnt) c combs c=sorted(c) c sorted(c) sorted c dx=c[1][0]-c[0][0] dx c[1][0]-c[0][0] c[1][0] [1] c 1 0 c[0][0] [0] c 0 0 dy=c[1][1]-c[0][1] dy c[1][1]-c[0][1] c[1][1] [1] c 1 1 c[0][1] [0] c 0 1 cnt=0 cnt 0 for i in range(n):
        subdot=(dots[i][0]+dx,dots[i][1]+dy)
        if subdot in dots:
            cnt+=1
     i range(n) range n subdot=(dots[i][0]+dx,dots[i][1]+dy) subdot (dots[i][0]+dx,dots[i][1]+dy) dots[i][0]+dx dots[i][0] [i] dots i 0 dx dots[i][1]+dy dots[i][1] [i] dots i 1 dy if subdot in dots:
            cnt+=1
     subdot in dots subdot dots cnt+=1 cnt 1 tmp=max(tmp,cnt) tmp max(tmp,cnt) max tmp cnt print(n-tmp) print n-tmp n tmp tmp=max(tmp,cnt) max(tmp,cnt) tmp n=int(input()) int(input()) n dots=[] [] dots tmp=0 0 tmp cnt=0 0 cnt c=sorted(c) sorted(c) c dy=c[1][1]-c[0][1] c[1][1]-c[0][1] dy y=map(int,input().split()) map(int,input().split()) y dots=sorted(sorted(dots, key=lambda x:x[1])) sorted(sorted(dots, key=lambda x:x[1])) dots combs=combinations(dots,r=2) combinations(dots,r=2) combs subdot=(dots[i][0]+dx,dots[i][1]+dy) (dots[i][0]+dx,dots[i][1]+dy) subdot x,y=map(int,input().split()) map(int,input().split()) x dx=c[1][0]-c[0][0] c[1][0]-c[0][0] dx cnt+=1 1 cnt
n=int(input())
dots=[]
for i in range(n):
    x,y=map(int,input().split())
    dots.append((x,y))
dots=sorted(sorted(dots, key=lambda x:x[1]))
#print(dots)
from itertools import combinations

combs=combinations(dots,r=2)
tmp=0
for c in combs:
    c=sorted(c)
    dx=c[1][0]-c[0][0]
    dy=c[1][1]-c[0][1]
    cnt=0
    for i in range(n):
        subdot=(dots[i][0]+dx,dots[i][1]+dy)
        if subdot in dots:
            cnt+=1
    tmp=max(tmp,cnt)
print(n-tmp)