from collections import defaultdict

n=int(input())
if n==1:
    print(1)
    exit()
x=[]
y=[]
for i in range(n):
    xx,yy=list(map(int,input().split()))
    x.append(xx)
    y.append(yy)

dif=defaultdict(int)

for i in range(n):
    for j in range(n):
        if i==j:continue
        p=x[j]-x[i]
        q=y[j]-y[i]
        dif[(p,q)]+=1

dif=sorted(dif.items(),key=lambda x:x[1],reverse=True)
ans=n-dif[0][1]

print(ans) from collections import defaultdict n=int(input()) n int(input()) int input() input if n==1:
    print(1)
    exit() n==1 n 1 print(1) print 1 exit() exit x=[] x [] y=[] y [] for i in range(n):
    xx,yy=list(map(int,input().split()))
    x.append(xx)
    y.append(yy) i range(n) range n xx,yy=list(map(int,input().split())) xx list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split yy x.append(xx) x.append x append xx y.append(yy) y.append y append yy dif=defaultdict(int) dif defaultdict(int) defaultdict int for i in range(n):
    for j in range(n):
        if i==j:continue
        p=x[j]-x[i]
        q=y[j]-y[i]
        dif[(p,q)]+=1 i range(n) range n for j in range(n):
        if i==j:continue
        p=x[j]-x[i]
        q=y[j]-y[i]
        dif[(p,q)]+=1 j range(n) range n if i==j:continue
         i==j i j p=x[j]-x[i] p x[j]-x[i] x[j] x j x[i] x i q=y[j]-y[i] q y[j]-y[i] y[j] y j y[i] y i dif[(p,q)]+=1 dif[(p,q)] dif (p,q) p q 1 dif=sorted(dif.items(),key=lambda x:x[1],reverse=True) dif sorted(dif.items(),key=lambda x:x[1],reverse=True) sorted dif.items() dif.items dif items key=lambda x:x[1] key lambda x:x[1] x[1] x 1 x reverse=True reverse True ans=n-dif[0][1] ans n-dif[0][1] n dif[0][1] [0] dif 0 1 print(ans) print ans p=x[j]-x[i] x[j]-x[i] p xx,yy=list(map(int,input().split())) list(map(int,input().split())) xx dif=sorted(dif.items(),key=lambda x:x[1],reverse=True) sorted(dif.items(),key=lambda x:x[1],reverse=True) dif x=[] [] x dif=defaultdict(int) defaultdict(int) dif ans=n-dif[0][1] n-dif[0][1] ans q=y[j]-y[i] y[j]-y[i] q y=[] [] y yy=list(map(int,input().split())) list(map(int,input().split())) yy n=int(input()) int(input()) n
from collections import defaultdict

n=int(input())
if n==1:
    print(1)
    exit()
x=[]
y=[]
for i in range(n):
    xx,yy=list(map(int,input().split()))
    x.append(xx)
    y.append(yy)

dif=defaultdict(int)

for i in range(n):
    for j in range(n):
        if i==j:continue
        p=x[j]-x[i]
        q=y[j]-y[i]
        dif[(p,q)]+=1

dif=sorted(dif.items(),key=lambda x:x[1],reverse=True)
ans=n-dif[0][1]

print(ans)