log = console.log;
var stdin = require("fs").readFileSync("/dev/stdin", "UTF-8");
var lines = stdin.split("\n");
var N = lines[0].split(" ").map(Number)[0];
var Points = lines
  .slice(1)
  .filter(v => v !== "")
  .map(v => v.split(" ").map(Number));

var diffList = [];

Points.forEach((pointA, i) => {
  var Ax = pointA[0];
  var Ay = pointA[1];
  diffList[i] = [];
  Points.forEach(pointB => {
    var Bx = pointB[0];
    var By = pointB[1];
    if (Bx === Ax && By === Ay) return;
    diffList[i].push([Bx - Ax, By - Ay]);
  });
});

var dList = [];
var countList = {};
diffList.forEach(diff => {
  diff.forEach(d => {
    countList[d.toString()] = countList[d.toString()]
      ? countList[d.toString()] + 1
      : 1;
  });
});

var max = 0
Object.keys(countList).forEach(key=>{
  if(countList[key] > max) max = countList[key]
})
log(N - max)