import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.string;

immutable long MOD = 998244353 ;

void main() {
    auto N = readln.chomp.to!int;
    auto A = iota(N).map!(_ => readln.split.map!(to!long).array).array;

    int ans = N;

    foreach (i; 0..N) {
        foreach (j; i+1..N) {
            long dx = A[i][0] - A[j][0];
            long dy = A[i][1] - A[j][1];
            auto uf = new UnionFind(N);
            foreach (a; 0..N) {
                foreach (b; a+1..N) {
                    if (A[a][0] - A[b][0] == dx && A[a][1] - A[b][1] == dy) {
                        uf.unite(a, b);
                    } else if (A[b][0] - A[a][0] == dx && A[b][1] - A[a][1] == dy) {
                        uf.unite(a, b);
                    }
                }
            }
            ans = min(ans, uf.table.map!(a => a < 0).sum);
        }
    }

    ans.writeln;
}


class UnionFind {
    int N;
    int[] table;

    this(int n) {
        N = n;
        table = new int[](N);
        fill(table, -1);
    }

    int find(int x) {
        return table[x] < 0 ? x : (table[x] = find(table[x]));
    }

    void unite(int x, int y) {
        x = find(x);
        y = find(y);
        if (x == y) return;
        if (table[x] > table[y]) swap(x, y);
        table[x] += table[y];
        table[y] = x;
    }
}