

function Main(input) {
  input = input.split("\n");
  var N = parseInt(input[0]);
  input.shift();
  var xy = input.map(i => i.split(" ").map(i => parseInt(i)));
  xy.splice(N,xy.length-N);
  var max=0;
  for(var i=0;i<N;i++){
    var cnt=0;
    for(var j=0;j<N;j++){
      if(i==0&&j==1){
        var xsub=xy[j][0]-xy[i][0];
        var ysub=xy[j][1]-xy[i][1];
        var ratio=xsub/ysub;
        cnt++;
      }else if(j==0&&i!=j){
        var xsub=xy[j][0]-xy[i][0];
        var ysub=xy[j][1]-xy[i][1];
        var ratio=xsub/ysub;
        cnt++;
      }else if(i!=j){
        var xsub=xy[j][0]-xy[i][0];
        var ysub=xy[j][1]-xy[i][1];
        ratiotmp=xsub/ysub;
        if(ratiotmp==ratio){
          cnt++;
        }
      }
    }
    max=Math.max(max,cnt);
  }
  var ans=1+N-max-1;
  console.log('%s', ans);
  return ans;
}

function debug(n){
  var input = document.getElementById("input"+n).value;
  var ans=Main(input);
  var result="WA";
  if(ans==document.getElementById("output"+n).value.split("\n")[0]){
    result="AC";
  }
  document.getElementById("result"+n).innerHTML=result;
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));