import std.stdio;
import std.algorithm;
import std.math;
import std.conv;
import std.string;

T readNum(T)(){
  return readStr.to!T;
}

T[] readNums(T)(){
  return readStr.split.to!(T[]);
}

string readStr(){
  return readln.chomp;
}

struct P{
  int x, y;
}

void main(){
  int n = readNum!int;
  P[] p = new P[](n);

  foreach(i; 0 .. n){
    auto s = readNums!int;
    p[i].x = s[0];
    p[i].y = s[1];
  }

  p.multiSort!("a.x < b.x", "a.y < b.y");

  int ret = n;
  foreach(i; 0 .. n-1){
    foreach(j; i+1 .. n){
      P d = {p[j].x - p[i].x, p[j].y - p[i].y};
      int cnt;

      bool[] f = new bool[](n);
      foreach(k; 0 .. n){
        if(f[k]) continue;
        f[k] = true;
        cnt++;

        for(int l = 1; ; l++){
          bool found;
          foreach(m; k+1 .. n){
            if((p[k].x + d.x * l) == p[m].x && (p[k].y + d.y * l) == p[m].y){
              f[m] = true;
              found = true;
            }
          }
          if(!found) break;
        }
      }

      ret = min(ret, cnt);
    }
  }

  writeln(ret);
}
