var GET=(function(){function f(s){return new g(s);}function g(s){this._s=s.trim().split("\n");this._y=0;}g.prototype.a=function(f){var s=this._s, y=this._y, r;if(typeof s[y]==="string")s[y]=s[y].split(" ").reverse();r=s[y].pop();if(!s[y].length)this._y++;return f?r:+r;};g.prototype.l=function(f){var s=this._s[this._y++].split(" ");return f?s:s.map(a=>+a);};g.prototype.m=function(n,f){var r=this._s.slice(this._y,this._y+=n).map(a=>a.split(" "));return f?r:r.map(a=>a.map(a=>+a));};g.prototype.r=function(n,f){var r=this._s.slice(this._y,this._y+=n);return f?r:r.map(a=>+a);};return f;})();
var o=GET(require("fs").readFileSync("/dev/stdin","utf8"));
function xArray(v){var a=arguments,l=a.length,r="Array(a["+--l+"]).fill(0).map(x=>{return "+v+";})";while(--l)r="Array(a["+l+"]).fill(0).map(x=>"+r+")";return eval(r);}

console.log(main());
function main(){
  var n = o.a();
  var x = o.m(n);
  x.sort((a,b)=>a[0]>b[0]?1:a[0]<b[0]?-1:a[1]-b[1]);
  var ans = n;
  for(var i = 0; i < n; i++){
    for(var j = i+1; j < n; j++){
      var a = xArray(0,n);
      var s = 0;
      var p = x[j][0]-x[i][0];
      var q = x[j][1]-x[i][1];
      for(var k = 0; k < n; k++){
        if(a[k])continue;
        s++;
        var tx = x[k][0];
        var ty = x[k][1];
        for(var l = k+1; l < n; l++){
          if(a[l])continue;
          if(x[l][0]-tx===p && x[l][1]-ty===q){
            a[l] = 1;
            tx = x[l][0], ty = x[l][1];
          }
        }
      }
      if(s < ans)ans = s;
    }
  }
  return ans;
}