#include <stdlib.h>
#include<iostream>
#include<bits/stdc++.h>
#include<cmath>
#define ll long long
const ll INF=0x3f3f3f3f;
#define mod 1000000007
using namespace std;
//priority_queue
const ll Maxn=1e5;
ll gcd(ll a,ll b)
{
    return b==0?a:gcd(b,a%b);
}
map<pair<int,int>,int>q;
int x[60],y[60];
int main()
{
int n;
cin>>n;
for(int i=1;i<=n;i++)
    cin>>x[i]>>y[i];
int Max=0;
for(int i=1;i<=n;i++)
    for(int j=1;j<=n;j++)
    if(i!=j)
{
    q[make_pair(x[i]-x[j],y[i]-y[j])]++;
  Max=max(Max,q[make_pair(x[i]-x[j],y[i]-y[j])]);
}
cout<<n-Max<<endl;
}

