fun hey(N: Int, points: Array<Pair<Long, Long>>) {
    if (N == 1) {
        println(1)
        return
    }

    val possiblePairs = mutableListOf<Pair<Long, Long>>()
    (0..(N - 1)).forEach { a ->
        (0..(N - 1)).forEach { b ->
            if (a != b) {
                val p = points[b]!!.first - points[a]!!.first
                val q = points[b]!!.second - points[a]!!.second
                possiblePairs.add(Pair(p, q))
            }
        }
    }

    var cost = Int.MAX_VALUE
    var fake = Int.MAX_VALUE
    possiblePairs.forEach {
        val p = it.first
        val q = it.second

        var sub = 0
        (0..(N-1)).forEach { i ->
            (0..(N-1)).forEach { j ->
                if (i != j) {
                    if ((points[i].first - points[j].first) == p && (points[i].second - points[j].second) == q) {
                        sub++
                    }
                }
            }
        }
cost = Math.min(cost, N - sub)
    }
    println(cost)
}

fun main(args : Array<String>) {
    val N = readLine()!!.toInt()
    val points: Array<Pair<Long, Long>> = Array(N, { Pair(0L, 0L) })
    (1..N).forEach {
        val (x, y) = readLine()!!.split(" ").map { it.toLong() }
        val pair = Pair(x, y)
        points[it - 1] = pair
    }
    hey(N, points)
}