#include<bits/stdc++.h>
using namespace std;
using ll = long long;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

#define FOR(i,a,b) for(ll i=(a);i<(b);++i)
#define ALL(v) (v).begin(), (v).end()
#define p(s) cout<<(s)<<endl
#define p2(s, t) cout << (s) << " " << (t) << endl
#define br() p("")
#define pn(s) cout << (#s) << " " << (s) << endl
#define p_yes() p("Yes")
#define p_no() p("No")

const ll mod = 1e9 + 7;
const ll inf = 1e18;

void vprint(vector<ll> A){
    ll L = A.size();
    FOR(i, 0, L){
        if(i) cout << ' ';
        cout << A[i];
    }
    cout << endl;
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);

    // input
    ll N;
    cin >> N;

    if(N==1){
        p(1);
        return 0;
    }

    if(N==2){
        p(1);
        return 0;
    }

    vector<pair<ll, ll> > P;
    FOR(i, 0, N){
        ll x, y; cin >> x >> y;
        P.push_back(make_pair(x, y));
    }
    sort(ALL(P));

    set<pair<ll, ll> > se;
    FOR(i, 0, N){
        FOR(j, i+1, N){
            ll dx = P[i].first - P[j].first;
            ll dy = P[i].second - P[j].second;
            if(dx<0){
                dx *= -1;
                dy *= -1;
            }
            se.insert(make_pair(dx, dy));
            se.insert(make_pair(-dx, -dy));
        }
    }

    // for(auto pa : P){
    //     p2(pa.first, pa.second);
    // }
    
    map<pair<ll, ll>, ll> mp;
    FOR(i, 0, N){
        auto pa = P[i];
        mp[pa] = i;
    }    

    ll min_count = inf;
    for(auto v : se){
        // if(v.first==1 && v.second==0){
        //     //ok
        // }else{
        //     continue;
        // }

        ll count = 0;
        ll dx = v.first;
        ll dy = v.second;
        // cout << "v " << dx << ' ' << dy << endl;
        vector<bool> used(N);
        ll prev_x = inf;
        ll prev_y = inf;
        FOR(i, 0, N){
            ll x = P[i].first;
            ll y = P[i].second;
            // p2(x, y);
            if(used[i]) continue;
            used[i]=true;
            // p("P");
            // p2(P[i].first, P[i].second);
            if(prev_x + dx == x && prev_y + dy == y){
                //
            }else{
                count++;
            }
            prev_x = x;
            prev_y = y;

            for(;;){
                // 次の点があるなら
                auto next_p = make_pair(x+dx, y+dy);
                if(mp.count(next_p)>0){
                    ll index = mp[next_p];
                    if(!used[index]){
                        used[index]=true;
                        // その点へ
                        x = next_p.first;
                        y = next_p.second;
                        if(prev_x + dx == x && prev_y + dy == y){
                            //
                        }else{
                            count++;
                        }
                        prev_x = x;
                        prev_y = y;
                    }
                    else{
                        break;
                    }
                }else{
                    break;
                }
            }
        }
        // pn(count);
        chmin(min_count, count);
    }

    p(min_count);
    
    return 0;
}

Measured memory_bytes: 384