n = gets.chomp.to_i
arr = []
n.times { arr << gets.chomp.split(' ').map(&:to_i) }
distances = Hash.new(0)
(0...n).each do |i|
  (0...n).each do |j|
    next if i == j
    distances["{#{arr[i][0] - arr[j][0]}}&{#{arr[i][1] - arr[j][1]}}"] += 1
  end
end
max = distances.inject(0) { |acc, v| [acc, v[1]].max }
puts n - max