#include <bits/stdc++.h>
using namespace std;
#define rep(i, m, n) for (int i = m; i < n; ++i)

int main() {
  int N; cin >> N;
  using P = pair<int, int>;
  vector<int> X(N), Y(N);
  rep(i, 0, N) cin >> X[i] >> Y[i];
  map<P, int> ma;
  rep(i, 0, N) ma[P(X[i], Y[i])]++;
  int ans = N;
  rep(i, 0, N-1) rep(j, i+1, N) {
    int dx = X[i] - X[j];
    int dy = Y[i] - Y[j];
    int cnt = N;
    rep(k, 0, N) if(ma[P(X[k] + dx, Y[k] + dy)]) cnt--;
    ans = min(ans, cnt);
  }
  if(N == 1) ans = 1;
  cout << ans << endl;
  return 0;
}
