import Foundation


func readWords<T>(_ f: (Substring) -> T) -> [T] {
    return readLine()!.split(separator: " ").map(f)
}

func main() {
    let n = Int(readLine()!)!

    let points = (1...n).map { _ -> (Int, Int) in
        let xy = readWords { Int($0)! }
        let x = xy[0]
        let y = xy[1]

        return (x, y)
    }

    var distances = [[Int]: Int]()
    for (p, q) in points {
        for (b, d) in points {
            if (p, q) == (b, d) {
                continue
            }
            let pb = p - b
            let qd = q - d
            distances[[pb, qd], default: 0] += 1
        }
    }
    let v = distances.values.max()!
    print(n - v)
}


main()