import std.stdio;
import std.conv;
import std.string;
import std.typecons;
import std.algorithm;
import std.array;
import std.range;
import std.math;
import std.regex : regex;
import std.container;
import std.bigint;


void main()
{
  auto n = readln.chomp.to!int;
  auto p = new int[][](n, 2);

  foreach (i; 0..n) {
    p[i] = readln.chomp.split.to!(int[]);
  }

  string p2s(int dx, int dy) {
    return dx.to!string ~ ":" ~ dy.to!string;
  }

  auto res = n;
  auto f = new bool[](n);

  void calc(int cnt, int[string] pat, int a, int b) {
    if (cnt == n) {
      int m;
      foreach (k; pat.keys) {
        m = max(pat[k], m);
      }

      res = min(res, max(cnt - m, 1));
    }

    foreach (i; 0..n) {
      if (f[i]) continue;
      auto l1 = p2s(a-p[i][0], b-p[i][1]);
      f[i] = true;
      pat[l1]++;
      calc(cnt + 1, pat, p[i][0], p[i][1]);
      pat[l1]--;
      f[i] = false;
    }
  }

  int[string] pattern;
  pattern["0:0"]++;
  foreach (i; 0..n) {
    f[i] = true;
    calc(1, pattern, p[i][0], p[i][1]);
    f[i] = false;
  }
  res.writeln;
}
