import scala.io.{StdIn => in}
import scala.collection.{mutable => mu}

object Main extends App {
  import MapHelper._

  val n = in.readInt
  val pb = Iterator.continually(in.readLine)
    .take(n)
    .map(_.split(" ").map(_.toInt))
    .toArray
  
  val map = mu.HashMap.empty[(Int,Int),Int]

  for {
    a <- pb
    b <- pb
    if a != b
  } {
    val x = a(0) - b(0)
    val y = a(1) - b(1)
    map.addOrUpdate((x, y), 1)
  }


  val t = if(map.nonEmpty) map.maxBy(_._2)._2 else 0

  val ans = n - t
  println(ans)

  object MapHelper {
    implicit class AddOrUpdate[A](map:mu.HashMap[(Int,Int),Int]) {
      def addOrUpdate(key:(Int,Int), value:Int):mu.HashMap[(Int,Int),Int] =
      {
        if(map.contains(key)) map(key) += value
        else map += (key -> value)
        map
      }
    }
  }
}