#include <bits/stdc++.h>
#define FOR(i, a, b) for (int i=(a); i<(b); i++)
#define PPC(x) __builtin_popcount((x))
#define ALL(x) (x).begin(), (x).end()
#define pb push_back
using namespace std;

const int maxN = 51;

int x[maxN], y[maxN];
map <pair <int, int>, int> M;

int main()
{
	int n;
	scanf ("%d", &n);
	
	FOR(i, 0, n)
		scanf ("%d%d", x+i, y+i);
		
	FOR(i, 0, n) FOR(j, 0, n) if (i != j)
		M[{x[i] - x[j], y[i] - y[j]}]++;
		
	int z = 0;
	for (auto it : M)
		z = max(z, it.second);
		
	printf("%d\n", n - z);
	
	return 0;
}
