#include <bits/stdc++.h>
using namespace std;
static const int MAX_N = 50;

int main()
{
	int n;
	pair<int, int> xy[MAX_N];
	map<pair<int, int>, int> pqs;
	cin >> n;
	for (int i = 0; i < n; ++i)
	{
		cin >> xy[i].first >> xy[i].second;
	}
	for (int i = 0; i < n; ++i)
	{
		for (int j = 0; j < n; ++j)
		{
			if (i != j)
			{
				int dx = xy[i].first - xy[j].first;
				int dy = xy[i].second - xy[j].second;
				++pqs[make_pair(dx, dy)];
			}
		}
	}
	int count = 0;
	for (auto &pq : pqs)
	{
		count = max(count, pq.second);
	}
	cout << n - count << endl;
}