'use strict';
(function(input){
  input=input.trim().sprit(/\n+/);
  input=input.map(str=>str.split(/\s+/).map(x=>x-0));
  const N=input[0][0];
  if(N===1){
    console.log(1);
    return;
  }
  const delta=[];
  for(let m=1;m<=N;m++){
    for(let n=1;n<=N;n++){
      if(m===n){continue;}
      delta.push([input[n][0]-input[m][0],input[n][1]-input[m][1]]);
    }
  }
  var costCut=1;
  while(delta.length>0){
    var c=1;
    var d=delta.pop();
    var p=d[0],q=d[1];
    if(p===0&&q===0){
      continue;
    }
    for(let i=0,I=delta.length;i<I;i++){
      if(delta[i][0]===p&&delta[i][1]===q){
        c++;
        delta[i]=[0,0];
      }
    }
    if(c>costCut)costCut=c;
  }
  console.log(N-costCut);
})(require('fs').readFileSync('/dev/stdin','utf8'));