#include <bits/stdc++.h>
using namespace std;

int n, x[55], y[55];
set<pair<int, int>> s;

int main() {
	scanf("%d", &n);
	for (int i = 1; i <= n; ++i)
		scanf("%d%d", x + i, y + i), s.emplace(x[i], y[i]);
	if (n == 1) return puts("1"), 0;
	int ans = 1 << 30;
	for (int i = 1; i <= n; ++i)
		for (int j = 1; j <= n; ++j)
			if (j != i) {
				int p = x[j] - x[i], q = y[j] - y[i];
				int cnt = 0;
				for (int i = 1; i <= n; ++i)
					if (!s.count(make_pair(x[i] + p, y[i] + q)))
						++cnt;
				ans = min(ans, cnt);
			}
	printf("%d\n", ans);
	return 0;
}
