#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a) (a).begin(),(a).end()
#define ll long long
int main(){
  int N;
  cin>>N;
  vector<int> X(N),Y(N);
  rep(i,N) cin>>X[i]>>Y[i];
  vector<pair<ll,ll>> A;
  rep(i,N) rep(j,N) if(i!=j) A.push_back(make_pair(X[i]-X[j],Y[i]-Y[j]));
  sort(all(A));
  int cnt=1,M=1;
  rep(i,A.size()){
    if(i){
      if(A[i].first==A[i-1].first&&A[i].second==A[i-1].second){
        cnt++;
        M=max(M,cnt);
      }else cnt=1;
    }
  }
  if(M!=N) cout<<N-M<<endl;
  else cout<<N-M+1<<endl;
}