let N = Int(readLine()!)!
let ball: [(Int, Int)] = (0..<N).map { _ in
	let input = readLine()!.characters.split(" ").map{Int(String($0))!}
	return (input[0], input[1])
}
var dic = [String : Int]()
for i in ball {
	for j in ball {
		if i != j {
			let key = "\(i.0 - j.0),\(i.1 - j.1)"
			dic[key] = (dic[key] ?? 0) + 1
		}
	}
}
print(N - (dic.values.maxElement() ?? 0))