"use strict"
function main(arg) {
    arg = arg.trim().split("\n")
    var N = Number(arg.shift())
    var data = arg.map((e1) => {
        return e1.split(" ").map(Number)
    })
    var pq = getPq(data)
    var p = pq[0]
    var q = pq[1]
    var tmp = []
    for (var i = 0; i < data.length; i++) {
        for (var j = 0; j < data.length; j++) {
            if (i === j) continue
            var _p = data[i][0] - data[j][0]
            var _q = data[i][1] - data[j][1]
            if (p === _p && q === _q) {
                // console.log(i)
                tmp.push(i)
            }
        }
    }
    var b = tmp.filter(function (x, i, self) {
        return self.indexOf(x) === i;
    });
    console.log(data.length - b.length)
    // console.log(pq)
    return
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));


function getPq(data) {
    var pq = []
    for (var i = 0; i < data.length; i++) {
        for (var j = 0; j < data.length; j++) {
            if (i === j) continue
            var keyStr = [
                data[i][0] - data[j][0],
                data[i][1] - data[j][1]
            ].join(',')
            pq.push(keyStr)
            // console.log(keyStr)
        }
    }
    pq.sort()
    var pqcount = {}
    for (var i = 0; i < pq.length; i++) {
        var key = pq[i]
        if (pqcount[key] == null) {
            pqcount[key] = 0
        }
        pqcount[key] += 1
    }
    var result = ""
    var resultValue = 0
    for (var key in pqcount) {
        if (resultValue < pqcount[key]) {
            resultValue = pqcount[key]
            result = key
        }
    }
    // console.log(data.length - resultValue)
    return result.split(",").map(Number)
}
