#include<bits/stdc++.h>
#define fi first
#define se second
using namespace std;
map<long long,map<long long,long long> > cnt;
vector<pair<long long, long long> > inp;
signed main(){
	long long n;
	cin >> n;
	for(int i=0;i<n;i++){
		long long x,y;
		cin >> x >> y;
		inp.push_back({x,y});
	}
	long long ans=0;
	for(int i=0;i<inp.size();i++){
		for(int j=0;j<inp.size();j++){
			if(i==j){
				continue;
			}
			long long p=inp[j].fi - inp[i].fi;
			long long q=inp[j].se - inp[i].se;
			cnt[p][q]++;
			if(cnt[p][q]>ans){
				ans=cnt[p][q];
			}
		}
	}
	cout << (n-ans);
}