integer N
integer,allocatable,dimension(:)::x,y
integer p,q
integer ans,preans
read*,N
allocate(x(N),y(N))
do i=1,N
  read*,x(i),y(i)
end do

ans=N
do i=1,N
  do j=1,N
    if(i==j)cycle
    p=x(i)-x(j)
    q=y(i)-y(j)
    preans=N
    do ii=1,N
      do jj=1,N
        if(x(ii)+p==x(jj).and.y(ii)+q==y(jj))preans=preans-1
      end do
    end do
    ans=min(ans,preans)
  end do
end do

print"(i0)",ans

end