fun longList() = readLine()?.split(" ")?.map(String::toLong) ?: TODO()
fun main() {
    val n = readLine()?.toInt() ?: return
    val c = 0.until(n).map {
        val (x, y) = longList()
        Pair(x, y)
    }
    val map = hashMapOf<Pair<Long, Long>, Int>()
    0.until(n).forEach { i ->
        val a = c[i]
        0.until(n).forEach { j ->
            if (i != j) {
                val b = c[j]
                val d = Pair(a.first - b.first, a.second - b.second)
                map[d] = map.getOrDefault(d, 0) + 1
            }
        }
    }
    println((n - (map.values.max() ?: 0)).toString())
}
