import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void scan(T...)(ref T a) {
    string[] ss = readln.split;
    foreach (i, t; T) a[i] = ss[i].to!t;
}
T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

int calc(long[][] a) {

    int ans = int.max;
    int n = cast(int)a.length;
    for (int i = 0; i < n; i++) {
        for (int j = 0; j < n; j++) {
            if (i == j) continue;

            long dx = a[i][0] - a[j][0];
            long dy = a[i][1] - a[j][1];
            int match = 0;
            foreach (k; 0..n) {
                foreach (m; 0..n) {
                    if (k == m) continue;
                    if (a[k][0] - a[m][0] == dx && a[k][1] - a[m][1] == dy) {
                        match++;
                    }
                }
            }
            int cost = n - match;
            ans = min(ans, cost);
        }
    }
    return ans;
}

void main() {
    int n = readint;
    long[][] a;
    for (int i = 0; i < n; i++) {
        a ~= reads!long;
    }
    writeln(calc(a));
}
