require 'set'; require 'prime'; require 'pp'
INF=Float::INFINITY; MOD=10**9+7
n = gets.chomp.to_i
x = []
y = []
n.times do
  xx, yy = gets.chomp.split.map(&:to_i)
  x.push xx
  y.push yy
end

h = Hash.new(0)
n.times do |i|
  n.times do |j|
    next if i == j
    len = [x[i] - x[j], y[i] - y[j]]
    h[len] += 1
  end
end

puts n - h.values.max


