object Main {

  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)

    val N = sc.nextInt()
    val P: IndexedSeq[(Long, Long)] =
      (0 until N). map { _ =>
        val x, y = sc.nextLong()
        (x, y)
      }

    if (P.size == 1)
      println(0)
    else {
      val candidates = for {
        (bx, by) <- P
        (nx, ny) <- P
        if bx != nx || by != ny
      } yield (nx - bx, ny - by)
      val cost0 = candidates.groupBy(identity).values.map(_.size).max
      println(N - cost0)
    }
  }

}
