#include <stdio.h>
#include <stdlib.h>
#include <iostream>
#include <iomanip>
#include <vector>
#include <string.h>
#include <string>
#include <map>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <math.h>
#include <algorithm>
#include <numeric>

using namespace std;

// マクロ&定数 ============================================================
typedef unsigned int uint;
typedef long long ll;
//typedef pair<int, int> P;

typedef vector<int> vint;
typedef vector<ll> vll;
typedef vector<double> vdouble;
typedef vector<bool> vbool;
typedef vector<string> vstring;

typedef vector<pair<int, int>> vpint;
typedef vector<pair<ll, ll>> vpll;
typedef vector<pair<double, double>> vpdouble;

typedef vector<vector<int>> vvint;
typedef vector<vector<ll>> vvll;
typedef vector<vpint> vvpint;
typedef vector<vpll> vvpll;
typedef vector<vector<double>> vvdouble;
typedef vector<vector<string>> vvstring;
typedef vector<vector<bool>> vvbool;

typedef vector<vector<vector<ll>>> vvvll;

const int c_YET = -1;
const int INF = 1e9 + 1;
const ll LLINF = 1e17 + 1;
const int DX[9] = { 0,0,1,-1, 1, 1, -1, -1, 0 }; // 4;４近傍
const int DY[9] = { 1,-1,0,0, 1, -1, 1, -1, 0 }; // 8:８近傍 9:(0,0)を含む
const ll MOD = 1e9 + 7; //10^9 + 7
const ll MAX = 1e9;
const double PI = 3.14159265358979323846264338327950288;
//========================================================================

class UnionFind {
public:
	vector <ll> par; // 各元の親を表す配列
	vector <ll> siz; // 素集合のサイズを表す配列(1 で初期化)

	// Constructor
	UnionFind(ll sz_) : par(sz_), siz(sz_, 1LL) {
		for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
	}
	void init(ll sz_) {
		par.resize(sz_);
		siz.assign(sz_, 1LL);  // resize だとなぜか初期化されなかった
		for (ll i = 0; i < sz_; ++i) par[i] = i; // 初期では親は自分自身
	}

	// Member Function
	// Find
	ll root(ll x) { // 根の検索
		while (par[x] != x) {
			x = par[x] = par[par[x]]; // x の親の親を x の親とする
		}
		return x;
	}

	// Union(Unite, Merge)
	bool merge(ll x, ll y) {
		x = root(x);
		y = root(y);
		if (x == y) return false;
		// merge technique（データ構造をマージするテク．小を大にくっつける）
		if (siz[x] < siz[y]) swap(x, y);
		siz[x] += siz[y];
		par[y] = x;
		return true;
	}

	bool issame(ll x, ll y) { // 連結判定
		return root(x) == root(y);
	}

	ll size(ll x) { // 素集合のサイズ
		return siz[root(x)];
	}
};


int main() {

	////==================================
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(30);
	////==================================
	


	ll N;
	cin >> N;

	vpll XY(N);
	for (int i = 0; i < N; i++)
	{
		cin >> XY[i].first >> XY[i].second;
	}

	if (N <= 2)
	{
		cout << 1 << endl;
		return 0;
	}

	vpll PQ;
	for (int i = 0; i < N; i++)
	{
		for (int j = i + 1; j < N; j++)
		{
			pair<ll, ll> t;
			if (XY[i].first - XY[j].first > 0)
			{
				t = { XY[i].first - XY[j].first, XY[i].second - XY[j].second };
			}
			else if(XY[i].first - XY[j].first == 0)
			{
				t = { XY[j].first - XY[i].first,  abs(XY[j].second - XY[i].second) };
			}
			else
			{
				t = { XY[j].first - XY[i].first,  XY[j].second - XY[i].second };
			}
			PQ.emplace_back(t);
		}
	}


	sort(PQ.begin(), PQ.end());

	ll ans = LLINF;
	ll local = 1;
	//ll sum = 1;
	for (int i = 1; i < PQ.size(); i++)
	{
		if (PQ[i].first == PQ[i - 1].first && PQ[i].second == PQ[i - 1].second)
		{
			local++;
		}
		else
		{
			//cout << local << endl;
			//sum += local;
			ans = min(ans, N - local);
			local = 1;
		}
	}
	//cout << sum << endl;
	cout << ans;


	//ll ans = LLINF;
	//for (int i = 0; i < PQ.size(); i++)
	//{
	//	ll p = PQ[i].first;
	//	ll q = PQ[i].second;

	//	UnionFind uf(N);

	//	ll count = 0;

	//	for (int j = 0; j < N; j++)
	//	{
	//		for (int k = j + 1; k < N; k++)
	//		{
	//			if (XY[j].first - XY[k].first >= 0)
	//			{
	//				if (XY[j].first - XY[k].first == p && XY[j].second - XY[k].second == q)
	//				{
	//					uf.merge(j, k);
	//					count++;
	//				}
	//			}
	//			else
	//			{
	//				if (XY[j].first - XY[k].first == -p && XY[j].second - XY[k].second == -q)
	//				{
	//					uf.merge(j, k);
	//					count++;
	//				}
	//			}
	//		}
	//	}

	//	ll mass = 0;
	//	set<ll> all;
	//	for (int j = 0; j < N; j++)
	//	{
	//		all.insert(uf.root(j));
	//	}

	//	//ans = min(ans, (ll)all.size());
	//	ans = min(ans, N - count);

	//}

	//cout << ans;


}





Measured memory_bytes: 384