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 0..<N-1 {
    for j in i+1..<N {
        let xDist = ball[i].0 - ball[j].0
        let yDist = ball[i].1 - ball[j].1
        dic["\(xDist) \(yDist)"] = (dic["\(xDist) \(yDist)"] ?? 0) + 1
    }
}
print(N - (dic.values.maxElement() ?? 0))
