#include <bits/stdc++.h>

using namespace std;

#define pb push_back
#define mp make_pair
#define forn(i, n) for (int i = 0; i < (int)(n); ++i)
typedef long long LL;
typedef pair<int, int> PII;

int n;
int x[50], y[50];

map<PII, int> ma;

int main() {
    scanf("%d", &n);
    forn(i, n) scanf("%d%d", x + i, y + i);
    forn(i, n) forn(j, i) {
        ma[mp(x[i] - x[j], y[i] - y[j])] += 1;
        ma[mp(x[j] - x[i], y[j] - y[i])] += 1;
    }
    int mx = 0;
    for (auto p : ma) {
        mx = max(mx, p.second);
    }
    printf("%d\n", n - mx);
    return 0;
}
