program main
  implicit none
  integer(8) N,i,j,k,xi,yi,p,q,score,TOP
  integer(8),allocatable :: X(:),Y(:)

  read(*, *) N
  allocate(X(N),Y(N))
  do i = 1,N
    read(*, *)xi, yi
    X(i) = xi
    Y(i) = yi
  end do
  !score = 0
  TOP = 0
  do xi = 1,N
    do yi = 1,N
      if (xi /= yi) then
        p = X(xi)-X(yi)
        q = Y(xi)-Y(yi)
        score = 0
        do i = 1,N
          do j = 1,N
            if (X(i)-X(j) == p .and. Y(i)-Y(j) == q) then
              score = score + 1
            end if
          end do
        end do
        if (TOP < score) then
          TOP = score
        end if
      end if
    end do
  end do 
  write(*,*) N-TOP
end program main
