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.sort!"a.x > b.x";

  int pick;
  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; i .. n){
        foreach(l; k .. n){
          if(k == l || f[l]) continue;
          P s = {p[k].x - p[l].x, p[k].y - p[l].y};

          if(d.x == 0){
            if((d.x == s.x && s.y % d.y == 0)){
              cnt++;
              f[k] = f[l] = true;
            }
          } else if(d.y == 0){
            if((d.y == s.y && s.x % d.x == 0)){
              cnt++;
              f[k] = f[l] = true;
            }
          } else {
            if(s.x != 0 && s.y != 0 && (s.x % d.x == 0) && (s.y % d.y == 0)){
              cnt++;
              f[k] = f[l] = true;
            }
          }
        }
      }

      pick = max(pick, cnt);
    }
  }

  writeln(n - pick);
}
