fun main(args: Array<String>) {
    diverta20192b()
}

fun diverta20192b() {
    val n = readLine()!!.toInt()
    val coordinates = (1..n).map { readLine()!!.split(' ').map { it.toLong() } }
        .map { Pair(it[0], it[1]) }.sortedBy { it.second }.sortedBy { it.first }

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

    val diffMap = mutableMapOf<Pair<Long, Long>, Int>()

    for (i1 in 0..coordinates.lastIndex) {
        for (i2 in i1 + 1..coordinates.lastIndex) {
            val c1 = coordinates[i1]
            val c2 = coordinates[i2]
            val diff = Pair( c1.first - c2.first, c1.second - c2.second)
            diffMap.put(diff, diffMap.getOrElse(diff, { 0 }) + 1)
        }
    }

    val answer = n - diffMap.map { it.value }.max()!!

    println(answer)
}
