import std;
import core.bitop;

// dfmt off
ulong MAX = 100_100, MOD = 1_000_000_007, INF = 1_000_000_000_000;
alias sread = () => readln.chomp();
alias lread(T = long) = () => readln.chomp.to!(T);
alias aryread(T = long) = () => readln.split.to!(T[]);
void aryWrite(T = long)(T[] ary){ ary.map!(x => x.text()).join(' ').writeln(); }
alias Pair = Tuple!(long, "X", long, "Y");
alias PQueue(T, alias less = "a>b") = BinaryHeap!(Array!T, less);
// dfmt on

void main()
{
    auto n = lread();
    auto p = new Pair[](n);
    foreach (i; iota(n))
    {
        long x, y;
        scan(x, y);
        p[i] = Pair(x, y);
    }
    p.sort!"a.X<b.X"();
    auto skip = new Pair[][](n, 0);
    bool[Pair] pq;
    foreach (i; iota(n))
    {
        foreach (j; iota(i + 1, n))
        {
            if (p[i].Y <= p[j].Y)
            {
                skip[i] ~= Pair(p[j].X - p[i].X, p[j].Y - p[i].Y);
                pq[Pair(p[j].X - p[i].X, p[j].Y - p[i].Y)] = true;
            }
        }
    }

    long ans = n;
    foreach (key; pq.byKey)
    {
        long cnt;
        foreach (i; iota(n))
        {
            if (skip[i].canFind(key))
            {
                cnt++;
            }
        }
        ans = min(n - cnt, ans);
    }
    ans.writeln();
}

void scan(TList...)(ref TList Args)
{
    auto line = readln.split();
    foreach (i, T; TList)
    {
        T val = line[i].to!(T);
        Args[i] = val;
    }
}
