fun main(args: Array<String>) {
    val n = readLine()!!.toInt()
    val cnt = mutableListOf<Pair<Int, Int>>()
    val ab = (1..n).map {
        val x = readLine()!!.split(" ").map { it.toInt() }
        Pair(x[0], x[1])
    }.sortedBy { it.second }.sortedBy { it.first }
    var m = 0
    for (i in 0 until n - 1) {
        for (j in i + 1 until n) {
            val x = ab[j].first - ab[i].first
            val y = ab[j].second - ab[i].second
            cnt.add(Pair(x, y))
        }
    }
    for ((i, j) in cnt) {
        m = Math.max(m, cnt.count { it == Pair(i, j) })
    }
    println(n - m)
}