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])
}
let dic: [String : Int] = ball.map { i in
	ball.filter{$0 != i}.map { j in
		let key = "\(i.0-j.0),\(i.1-j.1)"
		return (dic[key] ?? 0)+1
	}
}
print(N-(dic.values.maxElement() ?? 0))