import java.util.*

object MainKt {
	@JvmStatic
	fun main(args: Array<String>) {
		val scanner = Scanner(System.`in`)
		val n = scanner.nextInt()
		val balls = arrayOfNulls<Pair<Int, Int>>(n)
		val map = mutableMapOf<Pair<Int, Int>, Int>()
		var max = 0
		for (i in 0..n-1) {
			balls[i] = Pair(scanner.nextInt(), scanner.nextInt())
			for (k in 0..i-1){
				var dx = balls[i]!!.first-balls[k]!!.first
				var dy = balls[i]!!.second-balls[k]!!.second
				if (dx<0) {
					dx*=-1
					dy*=-1
				}else if (dx==0 && dy<0) dy*=-1
				val d = Pair(dx, dy)
				map.put(d, (map[d]?:0)+1)
				max = Math.max(max, map[d]!!)
			}
		}
		println(n-max)
	}
}