object Main {
  def main(args: Array[String]): Unit = {
    val sc = new java.util.Scanner(System.in)
    val n = sc.nextInt
    val ps = Seq.fill(n, 2)(sc.nextInt)
    if (n == 1) {
      println(1)
      return
    }
    val deltas = for (i <- 0 until n; j <- i + 1 until n) yield {
      val (x1, y1) = (ps(i)(0), ps(i)(1))
      val (x2, y2) = (ps(j)(0), ps(j)(1))
      (x2 - x1, y2 - y1)
    }
    val count = deltas.groupBy(identity).mapValues(_.size).toSeq.map(_._2).max
    println(n - count)
  }
}