#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MOD=1000000007;
#define INF 1LL<<30
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()

int main() {
    int n;
    cin>>n;
    ll x[n],y[n];
    rep(i,n) cin>>x[i]>>y[i];

    map<pair<ll,ll>,int> m;
    rep(i,n){
        rep(j,n){
            if(i==j) continue;
            ll p=x[i]-x[j];
            ll q=y[i]-y[j];
            m[{p,q}]++;
        }
    }

    int ma=0;
    for(auto e : m){
        ma=max(ma,e.second);
    }

    cout<<n-ma<<endl;
}


