program picking_up
  implicit none
  integer :: n, x(50), y(50), i, j, k, l, p, q, m, t
  x = 0
  y = 0
  read(*,*) n
  do i = 1, n
    read(*,*) x(i), y(i)
  end do
  m = 0
  do i = 1, n
    do j = 1, n
      if (j.eq.i) cycle
      p = x(i)-x(j)
      q = y(i)-y(j)
      t = 0
      do k = 1, n
        do l = 1, n
        if ((x(k)-x(l).eq.p).and.(y(k)-y(l).eq.q)) t = t+1
        end do
      end do
      if (m.lt.t) m = t
    end do
  end do
  write(*,'(i0)') n-m
  stop
end program picking_up