import java.io.PrintWriter
val pw = PrintWriter(System.out)
fun main(args: Array<String>) {
    func()
    pw.flush()
}
fun println(value: Any) { pw.println(value) }

fun func() {
    val N = nextInt()
    val XY = Array<IntArray>(N, { listOfInt().toIntArray() })
    val map = mutableMapOf<Pair<Int, Int>, Int>()
    for (n in 0 until N) {
        for (m in 0 until N) {
            if (n == m) continue
            val dx = XY[m][0] - XY[n][0]
            val dy = XY[m][1] - XY[n][1]
            val key = Pair(dx, dy)
            if (map.containsKey(key)) {
                map[key] = (map[key] ?: 0) + 1
            } else {
                map[key] = 1
            }
        }
    }
    var max = map.values.max() ?: 0
    var ans = N - max
    println("${ans}")
}

fun next() = readLine()!!
fun nextInt() = Integer.parseInt(next())
fun listOfString() = next().split(" ")
fun listOfInt() = listOfString().map { Integer.parseInt(it) }

