function Main(input) {
    input = input.trim().split("\n");
    var N = parseInt(input[0], 10);
    var x = [];
    var y = [];
    for (var i = 0; i < N; i++){
        var tmp = input[i+1].split(" ");
        x[i] = parseInt(tmp[0], 10);
        y[i] = parseInt(tmp[1], 10);
    }

    var a = [];
    var k = 0;
    for (var i = 0; i < N; i++){
        for (var j = 0; j < N; j++){
            if (i != j) {
                var p = x[j] - x[i];
                var q = y[j] - y[i];
                a[k] = p+","+q;
                    k++;
            }
        }
    }

    if (a.length == 0) {
        console.log(N);
    }
    else {
        var maxA = a[0];
        var maxCount = 0;
        for (var i = 0; i < a.length-1; i++) {
            var count = 0;
            for (var j = i+1; j < a.length; j++){
                if (a[i] == a[j]) {
                    count++;
                }
            }
            if (count > maxCount) {
                maxCount = count;
                maxA = a[i];
            }
        }
        var tmp = maxA.split(",");
        var p = parseInt(tmp[0], 10);
        var q = parseInt(tmp[1], 10);

        var cost = [];
        for (var i = 0; i < N; i++){
            cost[i] = 1;
        }
        for (var i = 0; i < N; i++){
            for (var j = 0; j < N; j++){
                if (i != j) {
                    if ((y[j] - y[i]) == q && (x[j] - x[i]) == p) {
                        cost[j] = 0;
                    }
                }
            }
        }

        var sumCost = 0;
        for (var i = 0; i < N; i++){
            sumCost += cost[i];
        }
        console.log(sumCost);
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));