data class Int2D(val x: Int, val y: Int) {
    operator fun minus(o: Int2D) = Int2D(x - o.x, y - o.y)
}

fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val ps = Array<Int2D>(n, {
        val (x, y) = readLine()!!.split(" ").map { it.toInt() }
        Int2D(x, y)
    })

    if (n == 1) {
        println(1)
        return
    }

    val diffToCount = mutableMapOf<Int2D, Int>()
    for (i in 0 until n) {
        for (j in 0 until n) {
            if (i == j) continue
            val diff = ps[i] - ps[j]
            if (diffToCount.containsKey(diff)) {
                diffToCount[diff] = diffToCount[diff]!! + 1
            } else {
                diffToCount[diff] = 1
            }
        }
    }
    val max = diffToCount.values.max()!!
    println(n - max)
}