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

typedef pair<int,int> int_pair;

int main(void){
    int n; cin >> n;
    int x[n],y[n];
    for(int i=0;i<n;i++) cin >> x[i] >> y[i];

    map<int_pair,int> m;
    int max_cnt = 0;

    for(int i=0;i<n;i++){
        for(int j=0;j<n;j++){
            if(i!=j){
                int p = x[i]-x[j];
                int q = y[i]-y[j];
                max_cnt = max(max_cnt,++m[int_pair(p,q)]);
            }
        }
    }
    cout << n-max_cnt << endl;
}
